{"id":318,"hash":"ce7aee86e65dfecb1797d2dc875eb1433d76f651eac2cb6f02f27dfdc337e28b","pattern":"Error message &quot;go: go.mod file not found in current directory or any parent directory; see &#39;go help modules&#39;&quot;","full_message":"I just updated to the new version of Go - Go version 1.16.2 Linux/amd64 and am getting an error when I build a Hello, World! example:\n\ngo: go.mod file not found in current directory or any parent directory; see 'go help modules'\n\nEven when I follow the fix from this post it isn't working. I set these variables and then build again:\n\nGO111MODULE=on\nGOPROXY=https://proxy.golang.org,direct\n\nAnd the same problem unfortunately.","ecosystem":"go","package_name":"linux","package_version":null,"solution":"Yes, just follow the tutorial and for me that was doing go mod init test3 to create a module.  No one else has been upgrading from the old version or everyone else just understood it properly I guess.","confidence":0.95,"source":"stackoverflow","source_url":"https://stackoverflow.com/questions/66894200/error-message-go-go-mod-file-not-found-in-current-directory-or-any-parent-dire","votes":241,"created_at":"2026-04-19T04:41:52.371833+00:00","updated_at":"2026-04-19T04:52:38.788718+00:00"}