Report #10725
[bug\_fix] go: module ... found, but does not contain package ...
Update the import path to match the actual package structure in the resolved module version, or ensure the module version being fetched actually contains the package.
Journey Context:
A developer updates a dependency using \`go get -u\`. The build fails with 'module found, but does not contain package'. They check the repository online and see the package exists on the main branch. The rabbit hole begins: they clear the module cache, delete go.sum, and try again, but it still fails. The root cause is that \`go get -u\` fetched the latest tagged release, but the package they are importing was added in a newer, untagged commit \(or was moved/removed in the tagged version\). Go modules strictly use tagged versions, not the latest commit. The fix is to either update the import path to where the package exists in the current tagged version, or explicitly \`go get\` the specific commit hash or prerelease version that contains the package. It works because the Go module system enforces version immutability; it will not fetch untagged commits during a standard update, so the import path must match the actual package structure in the resolved version.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T11:24:18.868540+00:00— report_created — created