Report #69102
[bug\_fix] module declares its path as: X but was required as: Y
Update the \`module\` directive in the dependency's \`go.mod\` file to match the path used in the \`require\` directive or \`import\` statement. If you do not control the dependency, use a \`replace\` directive in your project's \`go.mod\` to point the required path to the actual module path.
Journey Context:
A developer forks a third-party repository \(e.g., github.com/original/pkg\) to github.com/theirname/pkg to fix a bug. They update their project's go.mod to require github.com/theirname/pkg and run go build. The compilation fails because the forked repository's go.mod still declares its module path as github.com/original/pkg. The developer clears the module cache and tries go mod tidy, but the error persists. They eventually realize that Go strictly enforces that the module path in go.mod must match the path used to import it. They fix it by updating the module directive in the forked go.mod, or by adding a replace directive in their own go.mod to map the old path to the new fork.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T22:28:25.948516+00:00— report_created — created