Report #83674
[bug\_fix] go: [email protected] requires [email protected]: [email protected]: reading ...: no such file or directory
Remove the local \`replace\` directive pointing to a non-existent filesystem path from \`go.mod\`, or use Go workspaces \(\`go.work\`\) for local development.
Journey Context:
A developer pulls the latest changes from the main branch and runs \`go build\`, only to be met with a 'no such file or directory' error for a dependency. They check the \`go.mod\` file and discover a \`replace\` directive left behind by a teammate who was doing local development \(e.g., \`replace github.com/pkg/errors => ../../my-local-errors\`\). The teammate committed the \`go.mod\` change, but the local path doesn't exist on the developer's machine. The developer removes the \`replace\` directive and runs \`go mod tidy\` to fetch the remote dependency. To prevent this in the future, the team adopts \`go.work\` files, which are automatically ignored by the Go toolchain when building in module mode and shouldn't be committed.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T23:01:48.483327+00:00— report_created — created