While opening my Go project in VSCode or using the Go: install/update tools command I am getting the following error:
1 tools failed to install.
gopls: failed to install gopls(golang.org/x/tools/gopls@latest): Error: Command failed: /usr/local/bin/go install -v golang.org/x/tools/gopls@latest
go: downloading golang.org/x/sys v0.1.0
../../pkg/mod/golang.org/x/[email protected]/go/packages/external.go:15:2: golang.org/x/[email protected]: read "https:/proxy.golang.org/@v/v0.1.0.zip": stream error: stream ID 9; NO_ERROR; received from peer
GOPATH is set properly (other tools were installed successfully).
Versions:
1.73.11.19.3.I updated the GOPROXY environment variable:
export GOPROXY="direct"
It started working after that.
Maybe some network issue within my company proxy was causing this in the first place.
Note: Add the statement to your respective shell profile to make this change permanent.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With