go
build_error
ai_generated
true
go: inconsistent vendoring in /path/to/project: vendor/modules.txt is out of date
ID: go/go-mod-tidy-inconsistent-vendoring
80%Fix Rate
87%Confidence
0Evidence
2024-04-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 1.14 | active | — | — | — |
Root Cause
The vendor directory's modules.txt does not match the requirements in go.mod, often due to adding/removing dependencies without running go mod vendor.
generic中文
vendor 目录中的 modules.txt 与 go.mod 中的要求不匹配,通常是在添加/删除依赖后未运行 go mod vendor 导致。
Workarounds
-
95% success
Run 'go mod vendor' to regenerate the vendor directory and modules.txt from go.mod.
-
90% success
Run 'go mod tidy' to clean up go.mod, then 'go mod vendor' to sync.
Dead Ends
Common approaches that don't work:
-
80% fail
The file is auto-generated; manual edits will be overwritten or cause further inconsistencies.
-
60% fail
Without re-vendoring, builds will fail if modules are not in cache or network is unavailable.