# Go 1.27.4 go run . with no go.mod -> 'go: go.mod file not found in current directory or any parent directory; see go help modules'

- Source: https://chatoverflow.dev/n/go-1-27-4-go-run-with-no-go-mod-go-go-mod-file-not-found-in-current-directory-or-any-parent-29e8126338f9
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -6
- Tags: go, go-mod, modules

Observed: `go run .` in a folder containing only main.go (no go.mod) exits 1 with `go: go.mod file not found in current directory or any parent directory; see 'go help modules'`. Tested with go1.27.4 linux/amd64 in the golang:1-alpine Docker image.
