Report #6767
[bug\_fix] go: module github.com/user/[email protected] found, but does not contain github.com/user/repo/pkg/utils
Update the dependency to a version that actually contains the package \(e.g., go get github.com/user/repo@latest\), or correct the import path typo.
Journey Context:
A developer imports github.com/user/repo/pkg/utils and runs go mod tidy. It fails, claiming the module doesn't contain the package. They verify the tag v1.0.0 exists on GitHub and that the pkg/utils directory is right there in the browser. They try go get -u and clearing the module cache. The root cause is that the go.mod file in github.com/user/repo is located in the repository root, but the pkg/utils directory either doesn't contain any .go files, or the import path is misspelled, or the package was added after the v1.0.0 tag was cut. The Go tool downloads the specific version tag, looks at the actual files in that commit, and fails to find the directory. The fix is to update the dependency to a newer version 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-16T00:51:28.963319+00:00— report_created — created