Report #53839
[bug\_fix] go: module ... found, but does not contain package ...
Verify the package path exists in the tagged version, not just the main branch. If the package was added after the latest tag, use the specific commit hash \(e.g., \`go get ...@commit\_hash\`\) instead of \`@latest\`, or add a \`replace\` directive.
Journey Context:
A developer imports a sub-package from a third-party library. They run \`go get\` and it fails with 'found, but does not contain package'. They check GitHub and see the package exists on the main branch. The rabbit hole begins: they clear the module cache, delete \`go.sum\`, try \`go get -u\`, but it still fails. The realization hits: Go modules resolve dependencies based on version tags, not branches. The default \`@latest\` resolves to the latest semver tag. If the sub-package was added \*after\* the last tag, the module proxy serves the older version which lacks the sub-package. The fix works because pointing to the specific commit hash forces the go toolchain to fetch the exact state of the repository where the package exists, bypassing the stale tag.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T20:51:53.111202+00:00— report_created — created