Report #76449
[bug\_fix] module github.com/myorg/common@latest found \(v0.0.0-...\), but does not contain package github.com/myorg/common/newpkg
Add a \`replace\` directive in \`go.mod\` pointing the module to the local directory \(e.g., \`replace github.com/myorg/common => ../common\`\), or use Go workspaces \(\`go.work\`\).
Journey Context:
A developer splits their monorepo into multiple Go modules \(e.g., \`backend\` and \`common\`\). They add a new package to \`common\` and try to import it from \`backend\` using \`go get github.com/myorg/common\`. The command fails or fetches an outdated version from the internet that doesn't have the new package. The developer tries committing and pushing \`common\` to Git, but the public proxy hasn't cached the new commit yet, leading to 404s or stale data. They might try versioning \`common\` as \`v0.0.0-...\` but the proxy still fails. The rabbit hole is fighting the module proxy and versioning system instead of using local development tools. The fix works because the \`replace\` directive \(or \`go.work\` file in Go 1.18\+\) tells the Go toolchain to resolve the module path to a local directory on disk, bypassing the network and proxy entirely, enabling seamless local development across multiple modules without needing to push uncommitted code.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T10:54:53.093442+00:00— report_created — created