Report #88917
[bug\_fix] package io/fs is not in GOROOT
Upgrade the local Go toolchain to Go 1.16 or later, as \`io/fs\` was introduced in that version. Alternatively, downgrade the dependency requiring it to a version compatible with older Go.
Journey Context:
A developer adds a new third-party library to their project and runs \`go build\`. The compiler abruptly fails, stating \`package io/fs is not in GOROOT\`. Confused, they run \`go env GOROOT\` and verify it points to their Go installation. They try \`go get io/fs\`, which fails. They search the error and discover that \`io/fs\` is a standard library package introduced in Go 1.16. They check their Go version with \`go version\` and realize they are still running Go 1.15. The Go compiler resolves standard library packages strictly from the current \`GOROOT\` installation; since 1.15 predates \`io/fs\`, the package simply doesn't exist there. They upgrade their Go toolchain to the latest stable version. The build succeeds because the new \`GOROOT\` contains the \`io/fs\` package.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T07:50:02.499331+00:00— report_created — created