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

- **ID:** `go/go-mod-init-invalid-go-version`
- **Domain:** go
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The go command is invoked outside of a module context, or the module has not been initialized with go mod init.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.11 | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   Run 'go mod init <module-name>' in the project root to create a go.mod file.
   ```
2. **** (80% success)
   ```
   If in GOPATH mode, set GO111MODULE=on and run go mod init, or move the project to a proper module path.
   ```

## Dead Ends

- **** — Modules are the default in modern Go; disabling them may lead to other dependency issues. (50% fail)
- **** — An incorrectly formatted go.mod can cause other errors. (30% fail)
