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
cmd/go: You are neither in a module nor in your GOPATH. #39030
Comments
@chrsbot Can you please provide the complete output of |
Hi, I sorted the problem. I just created a new file in the directory.
Thank you
…On Tue, 12 May 2020 at 22:02, Dmitri Shuralyov ***@***.***> wrote:
@chrsbot <https://github.com/chrsbot> Can you please provide the complete
output of go env in the issue? Also please include what command you ran
before you got the error, and what directory you ran that command in.
Thanks.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#39030 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/APCUKDAWPNBLP7AD25YKQ7DRRG2OPANCNFSM4M7FB5VQ>
.
|
@chrsbot We'd still like to understand whether this error was shown inappropriately and whether it's clear enough. Could you please tell us:
|
Sure thing. Hopefully the below answers suffice. go env command go env ** what command yo ean before you saw the error** Don't think I ran commands. The cause of the issue was I tried to create a package for testing, then import it into my main fail. Then the issue began to pop up. ** what directory you ran the command in ** I believe it was in $GOPATH (which I have set to C:\Users\chris\Documents\Swanbot) ** what files were there** ** what would have made the error more clear ** A walk-through of how to solve the problem would have made it more clear. As the error merely just states what the problem and gives you suggestions of what to do. A little tutorial of how to perform those steps would've been great. |
Where exactly did you see the error? Most issues here are seen after a
What resources have you looked at so far? Usually we recommend people go through Getting Started for installing Go, and then How to Write Go Code for directory layout and packaging. Both are linked from https://golang.org/doc. Developing code directly in |
Thank you for reminding me actually. I used go build actually. At first, I ran it in git bash terminal then in VSCode's terminal I believe.
I will have a closer look at these resources thank you. |
Closing this issue. Please let us know if something is missing from those introductory pages though. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I'm pretty sure I did nothing. The error just constantly pops up and I've read the other issues with this logged here but they don't help. Please provide a clear walk through (I'm new to this).
Just a side note, I am in my GOPATH folder. So, I'm really confused as to why this is happening.
What did you expect to see?
I expected to not see this message.
What did you see instead?
I saw this message.
The text was updated successfully, but these errors were encountered: