Report #100946
[bug\_fix] go: inconsistent vendoring in /project: consider removing vendor directory or running go mod vendor
Delete the vendor directory and run \`go mod vendor\` again, or add \`-mod=mod\` to the go command. Root cause: The vendor directory contains modules that do not match go.mod or go.sum, often after a version bump or merge conflict in go.mod without regenerating vendor.
Journey Context:
After merging a feature branch that updated a dependency, the build started failing with 'inconsistent vendoring'. I tried \`go mod tidy\` but it didn't help. The issue was that the vendor directory still had the old version of the dependency. Running \`rm -rf vendor && go mod vendor\` regenerated the vendor directory to match the updated go.mod and go.sum. This is a common pitfall in monorepos where developers forget to run \`go mod vendor\` after changing dependencies. The environment was a legacy Go 1.16 project that still used vendoring for deterministic builds.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-02T15:50:05.009079+00:00— report_created — created