Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

command 'go.tools.install' not found

I am trying to install Go tools in my VS Code editor and when I select the View, CMD, Install and select Go: Install/Update tools, I get this -> "command 'go.tools.install' not found" What am I doing wrong?

like image 959
DougHughes81 Avatar asked Aug 13 '26 13:08

DougHughes81


1 Answers

As seen in Microsoft/vscode-go issue 755:

For all guys who are stuck with command 'go.tools.install' not found problem on Windows.

Check if %GOPATH%\bin is in your PATH environment variable.
After half and an hour I finally figured out that PATH remains unchanged if you try to change it like set PATH=%PATH%.... You need explicitly change it in your system settings.

With recent Go installation, make sure GOROOT reference your Go installation folder.
I also like to set go.goroot to that folder in the settings of VSCode.
You don't need GOPATH: it defaults to %USERPROFILE%\go: make sure %USERPROFILE%\go\bin is in your PATH, before launching VSCode.

  • unzip go1.13.6.windows-amd64.zip anywhere (not in %USERPROFILE%\go, since it is reserved for GOPATH)
  • set GOROOT to C:\path\to\go (where you just uncompressed the Go archive)
  • add %GOROOT%\bin to %PATH%
like image 177
VonC Avatar answered Aug 16 '26 15:08

VonC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!