DEV Community

Gilbert Ngeno
Gilbert Ngeno

Posted on

1

go: go.mod file not found in current directory or any parent directory; see 'go help modules'

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:

go: go.mod file not found in current directory or any parent directory; see 'go help modules'

Even when I follow the fix from…

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay