microsoft / vscode-go

An extension for VS Code which provides support for the Go language. We have moved to https://github.com/golang/vscode-go
Other
5.93k stars 648 forks source link

0.14.2 broken on macos #3246

Closed ooZberg closed 4 years ago

ooZberg commented 4 years ago

What version of Go, VS Code & VS Code Go extension are you using?

Share the Go related settings you have added/edited

Run Preferences: Open Settings (JSON) command to open your settings.json file. Share all the settings with the go. or ["go"] prefixes.

Describe the bug

When trying to use the latest 0.14.2 version of the extension nothing works, like "Go: Current GOPATH", and if you look in the developer console you get

abstractExtensionService.ts:396 Activating extension 'ms-vscode.Go' failed: Cannot find module 'tough-cookie'
Require stack:
- /Users/oozberg/.vscode/extensions/ms-vscode.go-0.14.2/node_modules/request/lib/cookies.js
- /Users/oozberg/.vscode/extensions/ms-vscode.go-0.14.2/node_modules/request/index.js
- /Users/oozberg/.vscode/extensions/ms-vscode.go-0.14.2/node_modules/web-request/index.js
- /Users/oozberg/.vscode/extensions/ms-vscode.go-0.14.2/out/src/goLanguageServer.js
- /Users/oozberg/.vscode/extensions/ms-vscode.go-0.14.2/out/src/goInstallTools.js
- /Users/oozberg/.vscode/extensions/ms-vscode.go-0.14.2/out/src/goPackages.js
- /Users/oozberg/.vscode/extensions/ms-vscode.go-0.14.2/out/src/goBrowsePackage.js
- /Users/oozberg/.vscode/extensions/ms-vscode.go-0.14.2/out/src/goMain.js
- /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js
- /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-amd.js
- /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-fork.js.
notificationsAlerts.ts:40 Command 'Go: Current GOPATH' resulted in an error (command 'go.gopath' not found)

Steps to reproduce the behavior:

  1. Install the 0.14.2 extension on macos, as well as the official golang pkg installer
  2. Try to run Go: Current GOPATH

And for the record, downgrading to 0.14.1 works fine.

Screenshots or recordings

If applicable, add screenshots or recordings to help explain your problem.

butuzov commented 4 years ago

Can't confirm bug.

1) tough-cookie is on a place (have to check it with vsix extension) 2) Go: Current GOPATH gives /Users/butuzov/go is the current GOPATH.

The only diff I am still on 1.14.2, but I do believe it doesn't matter.

Try to delete the extension and install it again. it also possible to check is about subject npm module at ~/.vscode/extensions/ms-vscode.go-0.14.2. Npm modules a bundled with extension, so it supposes to be some client error.

ooZberg commented 4 years ago

Thanks for the hints. Uninstalling and re-installing did not work, tried that multiple times, including restarting VS Code in between, but what did work was:

stamblerre commented 4 years ago

Thanks for following up, @ooZberg! It's possible you had a corrupted installation. I'll close this issue unless we get more reports of similar issues.