Report #28757
[bug\_fix] go: module ... requires ... but ... is required
Update the conflicting top-level dependencies to their latest versions using \`go get -u \`, or use a \`replace\` directive in \`go.mod\` if a transitive dependency is abandoned. The root cause is a version conflict where two or more dependencies require different, incompatible versions of the same transitive dependency, and Go's minimal version selection cannot find a single version that satisfies all requirements.
Journey Context:
A developer adds a new library to their project and runs \`go build\`, only to be hit with a wall of text showing conflicting version requirements. They try \`go mod tidy\` and \`go get -u ./...\`, but the error persists. They dig into the dependency graph using \`go mod graph \| grep \` and discover that an older, deeply nested transitive dependency requires an ancient version of a package, while a newer top-level dependency requires a newer, incompatible version. Because Go uses minimal version selection, it won't automatically upgrade the transitive dependency. The developer updates the top-level package that relies on the old transitive dependency to its latest version, which resolves the conflict. If the transitive dependency is unmaintained, they add a \`replace\` directive to force the newer version.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T02:39:44.780142+00:00— report_created — created