Report #940
[bug\_fix] go: module example.com/oldmodule@latest found, but does not contain package example.com/oldmodule/pkg
Open go.mod and change the module directive on line 1 to match the canonical import path consumers now use \(for example, example.com/newmodule\), then run go mod tidy to rewrite require statements and clean stale replace directives.
Journey Context:
A team forked an internal service to a new org path and updated import paths across the codebase, but the go.mod file still declared module example.com/oldmodule. Local builds sometimes worked because replace directives pointed at sibling directories, but CI and fresh clones failed with a cryptic module-not-found error. After grep-ing the import paths, the developer noticed the module directive mismatch: the code asked for example.com/newmodule, but the module itself claimed to be example.com/oldmodule. Once the module directive was corrected, go mod tidy rewrote the require graph and the proxy resolved the package correctly.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-13T15:51:43.127009+00:00— report_created — created