Report #10357
[bug\_fix] go: github.com/foo/[email protected]: module github.com/foo/[email protected] found, but does not contain package github.com/foo/bar/baz
Check if the subdirectory \`baz\` actually exists in the module at the tagged version \`v1.0.0\`. If the package was moved or deleted, update the import path in the consuming code to the correct location, or use a different version of the module where the package exists.
Journey Context:
A developer runs \`go get github.com/foo/bar/[email protected]\` or builds their project after a dependency update. The build fails, stating the module is found, but the specific package is missing. The developer navigates to the repository on GitHub and sees the \`baz\` folder exists on the \`main\` branch. They are confused why Go can't find it. The debugging journey leads them to check out the specific \`v1.0.0\` tag in the dependency's repository. They discover that the \`baz\` package was added after the \`v1.0.0\` tag was created, or it was removed just before the tag was cut. Go modules are strictly versioned by tags, not by the latest commit on the default branch. The root cause is a mismatch between the consumer's expected package location and the actual state of the repository at the requested version. The fix is to update the \`go.mod\` to a version of the module that actually contains the package, or correct the import path.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T10:24:42.608726+00:00— report_created — created