-
Notifications
You must be signed in to change notification settings - Fork 646
Can't find any of the go tools? #10
Comments
What do you see when you run the If it's not what you expect, you can override the GOPATH to use by adding the "go.gopath" setting. See https://github.com/Microsoft/vscode-go#options. |
This is running me insane, I am sure i have all this tools, as I am using it in atom. but in VS, it keeps getting me this same error. how do i fix? |
from
|
Is this the same as #11 ? |
D'oh. I've figured out my issue. I had literally copy + pasted what the instructions had:
Those are just the available options! Really your settings should look like this:
|
@jchannon Yes, I think these are the same issue. For those you seeing this problem - could you share what you see when you run the |
@polds Good point, I've updated the README to make it more clear how to use those settings. |
Re: The comment above if your "Current GOPATH" shows |
My GOPATH is as expected So what's the plugin looking for? I assume the bin? Can't it just use $GOPATH/bin when looking for tools? |
It shouldn't matter what is in your PATH, the tools are located relative to your GOPATH. If you launch Code from a shell with a GOPATH set, you should see that running You can also override any other GOPATH settings by adding the {
"go.gopath": "/Users/lukeh/go"
} If anyone is having problems after these steps though, could you share details about your environment? |
setting it for an hour, but no luck. here is my
|
@Hokutosei What do you see when you run |
How do you launch it from shell? |
after browser restart, |
I normally use Atom and that works fine. I also got the 'missing tools' message. Would be good if it tells which tool instead of offering to install them, because I like to know what is happening. Anyway, I checked the list and the one tool that VS Code by default needs in addition to the Atom setup is
Also I found that VS Code has to be started from the commandline. Otherwise the message keeps coming up. This is also in the readme but maybe somebody missed it.
Still, the first time the message appeared but after clicking it the editor was satisfied after all. |
@jchannon
|
@Hokutosei thanks that solved it plus I now get the |
nope, its not working for me. edit some structs, nope, indents are not fixed when |
@Hokutosei sorry about that - if you do have time to share more details of your environment sometime that would be great. |
@lukehoban Shouldn't tools be searched in |
I think I'm seeing this issue too. From Go documentation:
Is this extension implementing that correctly? My GOPATH is a colon-separated string that includes a couple workspaces. Is that the reason it's not able to find any of the Go tools? I'm not sure if it's related because I'd imagine it should use PATH to find binaries. My PATH also contains multiple entries. Edit: Looks like it does correctly handle multiple GOPATH workspaces, at least in this one place here. |
$GOROOT/bin is not the only place. External tools like goreturns and golint are installed with 'go get' and therefore are compiled to $GOPATH/bin |
@shurcooL Looks like there was a bug in the logic for finding binaries when there are multiple workspaces. That should be fixed with b1e2a93. I pushed version 0.6.7 with that fix so if you update the extension you can see if that fixes this for you. There is still an issue where you will see "Analysis Tools Missing" if tools are not installed in the first of your workspaces, I'll open a separate issue on that. |
I'm trying to see if 0.6.7 makes a difference. The way I was testing it previously is opening a .go file, adding some unneeded whitespace and seeing if it gets formatted (via However, I've realized now that it seemingly not a supported feature. There are these options for on-save functionality:
But no go.formatOnSave, is there? I think it's a very basic and important feature, and I can't consider using more advanced features like lintOnSave if it's not running format on save. (Edit: I found #14 now.) For now, I've tried right clicking and doing "Format Code", and that appears to work now (although I am seeing some strange behavior regarding newlines, perhaps it's to do with |
Greetings, @lukehoban thank you for your efforts, everything seems to be working, those popping errors were gone, but still I need |
I am not versed in typescript nor an experienced github user to submit a pull request but, Should be a quick fix. @lukehoban thank you for this great work |
For me problem was that my machine is behind a proxy. After set |
Unfortunately I've the same problem, latest version of code and extension. My GOPATH is ok, I've also tried to set it in the |
@alecha Can you elaborate on what issue are you facing? |
the same of other users, my gopath is ok but when I save (so when the build runs) I get the error This is my settings.json file {
"go.buildOnSave": true,
"go.lintOnSave": true,
"go.vetOnSave": true,
"go.formatTool": "goimports",
"go.gopath": "MyGoPath"
} |
@alecha What do you see when you run "Go: Current GOPATH" in the command palette? This current thread is about the extension not able to find the installed tools which I believe is not your case. Can you try any of the other features? Are they erroring out too?
When you see the Also what version of VS Code and the Go extension are you using and which OS? |
GoPath is ok:
the error is
|
Still having the same issue with the following settings: { |
@EGJ1996 Can you elaborate on what issue you are seeing? |
@ramya-rao-a Thanks for the response! Error: spawn C:\Users\Dell\Desktop\Go Compiler\bin\go.exe ENOENT |
@EGJ1996 And you are sure that go.exe exists in "C:\Users\Dell\Desktop\Go Compiler\bin" ? |
@EGJ1996 Is this the first time you are using the Go extension? Those pop ups appear because the extension cannot find the Go tools in your GOPATH. If you are doing this for the first time, then you need to install the Go tools as per the pop ups. If you have already installed these Go tools, then then find where you installed them and add the corresponding GOPATH in |
I keep getting this error message. (MacOS VSCode) and after I choose Install All It only show
|
@amazingandyyy In your case the error message in the console says that you have not set GOPATH |
I found a solution for Gnome users and probably everyone else who starts code by its
# ~/.profile
export GOPATH="$HOME/.go" |
I ran into this over the weekend. None of the above worked. This is on Win 10 Pro Anniversary Update with all patches. And latest version of VS Code as I write. However, looking at the "install tools" message it was saying run So I went to the command prompt and typed |
After update this morning the same issue happened to me as well. It says Got any ideas how can I get it working? Also, there seems to be a bug with tools, it says: Thank you! EDIT: reinstalling the Go extension worked. I hate auto-updates. |
@lunemec Must be the case of the files of the old version of the Go extension still lingering around. There is a bug on this in the VS Code repo, but I can't seem to find it. But am glad you are unblocked, Happy Coding! |
I came across to this issue, re-installing and reloading the window didn't work. But, uninstalling, quitting VSCode, and reinstalling did the trick. |
@rakyll Which version of VS Code are you on? |
Version 1.13.0 (1.13.0) Let me explain further how this is reproducible. I am on a fresh new laptop with no Go installed. I installed VSCode and the Go extension before Go. Then, I installed Go from source and add the GOROOT/bin to my PATH. Even though, my bash was able to recognize the go command, VSCode was prompting the error message saying that I don't have go in my PATH. |
@rakyll At that point VS Code is not aware of the addition of GOROOT/bin to the PATH. At this point, if you close VS Code and open it from the terminal where you updated the PATH, VS Code should now be able to find Go. Does it not? |
@ramya-rao-a, it didn't. I exited VS Code and opened it from the terminal where |
@rakyll What system are you using, Linux, Mac or Windows? Can vscode's integrated terminal find |
@klingtnet, I am on a Mac. The integrated terminal also couldn't find go. |
I'll try and get a repro and get back to this thread |
I was in the same trouble, and I found it was caused by the Git Path. |
I was in the same trouble https fetch failed: Get https://golang.org/x/tools/imports?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. |
I've been trying to install the plugin and not having any success, every time I start writing anything I see notifications like:
and all the other tools it needs too. Even those these tools are in fact installed.
I've verified $GOPATH/bin is in my $PATH and I'm running on Go 1.5.1 installed with brew.
The text was updated successfully, but these errors were encountered: