Report #1313
[bug\_fix] go: @v2.0.0: missing /go.mod at revision v2.0.0
Use a version of the dependency that includes a \`go.mod\` file, or if you control the dependency, add a \`go.mod\` to its repository and tag a new release. If the dependency is unmaintained, use a \`replace\` directive to point to a local or forked version that has the \`go.mod\` file.
Journey Context:
A developer tries to \`go get\` a newer version of an older library. The repository maintainer recently tagged a v2.0.0 release. The developer updates their \`go.mod\` to point to \`v2.0.0\`, but the build fails with "missing go.mod at revision". The developer tries \`GOPROXY=direct\` or clearing the module cache, but it keeps failing. The rabbit hole involves checking if the tag exists in the remote git repository, which it does. The root cause is that the Go module system requires that any dependency at version v2.0.0 or higher must have a \`go.mod\` file. If a repository tags a v2.0.0 release but lacks a \`go.mod\`, the Go toolchain refuses to use it because it cannot determine the module path or enforce semantic import versioning. The fix is to either ask the maintainer to add a \`go.mod\` and retag, or use a \`replace\` directive to point to a local or forked version that has the \`go.mod\` file.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-14T15:41:48.860839+00:00— report_created — created