Report #1122
[bug\_fix] module path mismatch: go.mod declares a module path that does not match the repository URL or the import path consumers use
Edit the \`module\` directive in \`go.mod\` to exactly match the canonical import path of the repository \(e.g. \`module github.com/org/repo\`\), then run \`go mod tidy\` and tag releases from that path. If the module was renamed, update all internal import paths and downstream consumers, or add a \`replace\` directive only as a temporary local workaround.
Journey Context:
A developer clones a service named \`billing-svc\` from the company monorepo, renames the directory to \`billing\`, and pushes it to \`github.com/acme/billing\`. CI starts failing with \`go: github.com/acme/[email protected]: reading ... 404\` and local builds complain that imports under \`github.com/acme/billing/pkg/...\` cannot be found. They first suspect a proxy outage, then check GitHub permissions, then realize \`go.mod\` still says \`module gitlab.acme.internal/legacy/billing-svc\`. Because the Go module system uses the module path as the root of every import, any mismatch between the declared path and the actual repository location breaks resolution for both the toolchain and consumers. After updating \`go.mod\` to \`module github.com/acme/billing\`, running \`go mod tidy\`, and re-tagging \`v1.2.4\`, imports resolve and CI passes. The fix works because the module path is the identity of the module in the module graph; it must align with where the code is fetched from.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-13T17:57:12.512551+00:00— report_created — created