Report #77653
[bug\_fix] go: module example.com/m found, but does not contain package example.com/m/v2
The module author must update the module path in their go.mod to append the major version suffix \(e.g., module example.com/m/v2\), update all internal imports to use the /v2 suffix, and release a new v2.x.y tag. The consumer must then import it as example.com/m/v2.
Journey Context:
A developer adds a dependency on a library that just released v2.0.0. They run go get example.com/m/v2 and the command fails, stating the module was found but does not contain the package. They check the repository and see the v2.0.0 tag exists and the code is there. They try clearing the module cache, deleting go.sum, and trying different tags, but the error persists. The rabbit hole ends when they read the Go modules specification regarding semantic import versioning. They realize the v2.0.0 tag was created without updating the go.mod file's module directive to append /v2. The Go toolchain treats the module as v0/v1 because the path lacks /v2, causing a mismatch between the requested /v2 package and the actual module path. The fix requires the upstream author to correct their module path and re-release.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T12:56:38.572433+00:00— report_created — created