Report #45912
[bug\_fix] go: module github.com/example/project found, but does not contain package github.com/example/project/subpkg
Update the required version of the module in \`go.mod\` to a version that actually contains the sub-package, or correct the import path if it was mistyped.
Journey Context:
A developer imports \`github.com/example/project/subpkg\` and adds a \`replace\` directive pointing to a local clone: \`replace github.com/example/project => ../local\_project\`. The build works locally. They push to CI, the \`replace\` directive is ignored or removed, and CI fails with 'found, but does not contain package'. The developer inspects the remote repository and realizes the \`subpkg\` directory was added in a recent commit but hasn't been included in any tagged release. The \`go get\` command resolves to the latest tag \(e.g., \`v1.2.0\`\), which lacks the sub-package. Updating the dependency to the latest commit hash or a new tag fixes the issue because the Go toolchain strictly resolves dependencies to versioned releases, not branches.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T07:32:22.295909+00:00— report_created — created