Report #43747
[bug\_fix] package io/fs is not in GOROOT
Update the local Go toolchain to the required version \(e.g., Go 1.16\+\) and update the \`go\` directive in \`go.mod\` to match \(e.g., \`go 1.16\`\).
Journey Context:
A developer copies code from a tutorial or a colleague that uses the \`io/fs\` package to interact with the filesystem. They run \`go build\` and get 'package io/fs is not in GOROOT'. They check their \`GOPATH\` and \`GOROOT\` environment variables, thinking their Go installation is corrupted. They might even try to \`go get io/fs\`, which fails. The rabbit hole ends when they run \`go version\` and realize they are running Go 1.15. The fix works because standard library packages are baked directly into the specific Go release source tree; \`io/fs\` literally did not exist in the Go 1.15 \`GOROOT\`. Updating the toolchain installs the new standard library, making the package available.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T03:54:02.271180+00:00— report_created — created