Report #2464
[bug\_fix] module ...: module path ... should be .../v2
Update the \`module\` directive in the dependency's \`go.mod\` to include the \`/v2\` suffix, or if you are the consumer, ensure your import paths match the module's declared path. For major versions 2 and above, the module path must end with \`/vN\`.
Journey Context:
A developer adds a dependency using \`go get github.com/foo/bar/[email protected]\`. The build fails with 'module found but does not contain package'. They check GitHub and see the \`v2.1.0\` tag exists and contains the code. They clear the module cache, but it still fails. The issue is that the \`go.mod\` file in the \`v2.1.0\` tag of \`github.com/foo/bar\` declares its module path as \`github.com/foo/bar\` \(without the \`/v2\` suffix\). Go's minimal version selection and import compatibility rule dictate that a major version >= 2 must have a \`/vN\` suffix in the module path. Because the module path lacks \`/v2\`, the Go tooling treats it as a v0/v1 module and refuses to satisfy a \`/v2\` import with it. The fix is for the dependency author to update their \`go.mod\` to \`module github.com/foo/bar/v2\` and release a new tag, or for the consumer to drop the \`/v2\` from the import if they actually want the v1 path.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T12:19:24.145397+00:00— report_created — created