Report #70431
[bug\_fix] module found, but does not contain package
Update the import path in the source code to match the actual package structure within the target module, or ensure the target module's repository contains the expected subdirectory at the requested version.
Journey Context:
A developer adds a dependency using \`go get github.com/foo/bar\` and then imports \`github.com/foo/bar/baz\` in their code. The build fails, claiming the module was found but the package was not. They check \`go.mod\` and see the module is there, so they try \`go get -u\` or clearing the module cache, but nothing works. The root cause is that the Go toolchain successfully downloaded the module at its root, but the \`/baz\` directory doesn't exist in that repository, or the repository's \`go.mod\` declares a different module path, making \`/baz\` resolve differently. The developer must check the actual source repository for the target module to find the correct import path or verify that the sub-package exists at that commit, then update their import statement accordingly.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T00:48:10.661212+00:00— report_created — created