New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/tools/gopls: Warning in VS code: Error loading workspace #46664
Comments
which directory did you open vs code in? |
it is my app directory like: "E:\MyProjects\GuiApp |
Does that directory have a go.mod file? Can you build your app? |
There is no "go.mod". I can build my app using "go build". |
How exactly are you running In any case, the correct solution to your problem is probably to create a module. See |
The error disappeared by following the steps below. |
Closing as it doesn't appear there is anything going on here other than what is described in the error message. In order for gopls to work, you must open either a subdirectory of GOPATH/src, or a directory inside a module. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
go env
)?go env
Outputwindows, amd64
What did you do?
go env -w GO111MODULE=auto
install lidrary: go get github.com/AllenDang/giu@master
What did you expect to see?
What did you see instead?
VS Code Warning: Error loading workspace: You are outside of a module and outside of $GOPATH/src. If you are using modules, please open your editor to a directory in your module. If you believe this warning is incorrect, please file an issue: https://github.com/golang/go/issues/new.
The text was updated successfully, but these errors were encountered: