Report #104668
[bug\_fix] go: inconsistent vendoring: ... \(or 'vendor directory does not match go.mod'\)
Run \`go mod vendor\` to regenerate the vendor directory from go.mod and go.sum. Ensure that GOFLAGS does not include -mod=vendor if you are not using vendoring.
Journey Context:
A developer worked on a project that used vendoring \(GOFLAGS=-mod=vendor\). After adding a new dependency via \`go get\`, they manually copied some files into the vendor directory to fix a bug. The next build failed with 'inconsistent vendoring' because the vendor/modules.txt file no longer matched go.mod. The developer tried to delete the vendor directory and run \`go mod vendor\`, but the build still failed because GOFLAGS forced vendor mode. They removed GOFLAGS, ran \`go mod vendor\`, then set GOFLAGS back. The vendor directory was regenerated correctly. The root cause was manual modification of vendor without updating go.mod and go.sum.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-09-20T20:06:34.323447+00:00— report_created — created