Report #80655
[bug\_fix] go: package example.com/pkg is not in GOROOT
Run \`go mod tidy\` to ensure the module is downloaded, or check if the package import path is correct and the module is listed in \`go.mod\`.
Journey Context:
A developer imports a third-party package and runs \`go build\`. It fails with 'package is not in GOROOT'. They are confused because it's a third-party package, not a standard library package. This happens because the Go compiler, unable to find the package in the module cache or \`go.mod\`, falls back to looking in the GOROOT \(standard library\) and fails. The developer forgot to run \`go mod tidy\` or \`go get\` to add the dependency to \`go.mod\` and download it to the local module cache. Running \`go mod tidy\` resolves the missing dependency.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T17:58:57.861763+00:00— report_created — created