Report #86128
[bug\_fix] go: github.com/user/[email protected]: missing go.sum entry; to add it: go mod download github.com/user/repo
Run go mod tidy or the specific command suggested by the error \(go mod download @\) to fetch the module and populate the go.sum file with the correct checksums.
Journey Context:
A developer checks out a colleague's branch which added a new dependency. They run go build and get an error about a missing go.sum entry. They try go run main.go, but it fails the same way. The developer wonders why the build doesn't just fetch the missing checksum automatically, as it did in older versions of Go. They recall that Go 1.16 changed the default behavior of go build and go test to require go.sum entries to be present beforehand \(-mod=readonly by default\), preventing automatic modifications to go.mod and go.sum during a build to ensure reproducibility. They run go mod tidy, which correctly resolves all dependencies, downloads the missing module, and adds the cryptographic hashes to go.sum, allowing the build to proceed securely.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T03:09:27.127893+00:00— report_created — created