Report #85437
[bug\_fix] module ... found, but does not contain package ...
Tag a new release of the dependency module that includes the new package, or update the version requirement in go.mod to a pseudo-version or tag that contains the subdirectory. The Go tooling resolves dependencies to the latest semantic version tag, not the latest commit on the default branch.
Journey Context:
A developer adds a new package to an internal monorepo module, imports it in another service, and runs go mod tidy. It fails, saying the module is found but doesn't contain the package. They check the repository and see the package right there on the main branch. The rabbit hole begins: they check replace directives, clear the mod cache, and try again. Finally, they realize they are importing the package using a version tag \(e.g., v1.2.3\), but the new package was added after v1.2.3 was tagged. The Go tooling resolves the dependency to the latest semantic version tag, which doesn't have the new subdirectory. The fix is to tag a new release of the dependency module, or use a pseudo-version if strictly necessary.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T01:59:21.596127+00:00— report_created — created