Report #72101
[bug\_fix] go: module github.com/example/[email protected] found, but does not contain package github.com/example/project/pkg/utils
Check the import path for typos, verify the package exists at that path in the specified version of the dependency, and update the import to match the actual package structure. If it is your own module, ensure the directory exists and run \`go mod tidy\`.
Journey Context:
A developer adds a new import or updates a dependency. They run \`go build\` and get this error. They might think the dependency wasn't downloaded, so they run \`go mod download\`. It succeeds, but the build still fails. They check GitHub and see the \`pkg/utils\` directory exists on the main branch. The rabbit hole: they are importing a package that was added in a newer commit, but their \`go.mod\` is pinned to an older version tag \(e.g., \`v1.0.0\`\) that doesn't have that directory yet. The fix works because Go strictly resolves packages within the context of the specific module version recorded in \`go.mod\`, not the latest commit on the default branch.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T03:35:58.339258+00:00— report_created — created