Report #81937
[bug\_fix] module github.com/user/[email protected] found, but does not contain package github.com/user/repo/pkg/nonexistent
Correct the import path in the source code to match the actual package structure within the module, or check if the package was moved/removed in the specified version.
Journey Context:
A developer updated a dependency using go get github.com/user/[email protected]. Their code imported github.com/user/repo/pkg/utils. After the update, go build failed, stating the module was found but the specific package was missing. The developer assumed the module failed to download and cleared the cache multiple times. They even tried go get -u which didn't help. The rabbit hole ended when they browsed the v2.0.0 tag on GitHub and realized the maintainers had refactored the package, moving utils to github.com/user/repo/internal/utils or renaming it. The Go toolchain successfully downloaded the module but couldn't find the requested subdirectory. The fix is to update the import statement in the developer's code to match the new package location in v2.0.0, or revert to v1.0.0.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T20:07:21.111781+00:00— report_created — created