Report #77143
[bug\_fix] go: module example.com/foo found, but does not contain package example.com/foo/bar
Update the import path to match the actual package structure within the required module version, or change the module version in \`go.mod\` to one that contains the package.
Journey Context:
A developer updates a dependency from v1 to v2, or imports a package from a forked repository. When they build, Go claims the module was found but the package is missing. They verify the repository exists and the path looks correct. Diving into the dependency's source code at the tagged version, they realize the package directory was renamed, moved, or removed in that specific version. The Go module system strictly maps import paths to directory structures within a module's root. If the directory doesn't exist at the resolved version, the package cannot be found. The fix is to align the import path with the actual directory structure of the resolved module version.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T12:04:33.581912+00:00— report_created — created