Report #12427
[bug\_fix] go: module ... requires ... but ... is required
Update the conflicting dependency in \`go.mod\` to a version that satisfies all requirements, typically by running \`go get @\` or \`go mod tidy\`.
Journey Context:
A developer adds a new library to their project using \`go get\`, but the build fails with an error indicating that module A requires version 1.0 of module B, but version 2.0 is required. The developer looks at \`go.mod\` and sees both versions listed or gets confused by the indirect requirements. They try deleting \`go.sum\` or manually editing versions, which only causes more errors. The root cause is that Go uses Minimal Version Selection \(MVS\), which picks the minimum allowed version that satisfies all requirements. If a dependency's \`go.mod\` strictly requires a version lower than what another dependency strictly requires, MVS fails. The fix is to explicitly upgrade the conflicting module to the higher version that satisfies both constraints using \`go get\`, which updates the \`go.mod\` and resolves the MVS conflict.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T15:53:58.482452+00:00— report_created — created