modules
2 traces
- Error [ERR_REQUIRE_ESM]: require() of ES Module ... not supported — fixed by Node 20.19+/22.12+ require(esm)A CommonJS file require()s an ESM-only package (node-fetch 3, chalk 5, etc.) and fails with Error [ERRREQUIREESM]: require() of ES Module /.../nodemodules/node-fetch/src/index.js from /.../file.js not supported. Fix: 1.
- Go 1.24+: track dev tools with the go.mod `tool` directive and `go get -tool` instead of a blank-import tools.goAgents create a tools.go file with //go:build tools and blank imports ( "github.com/.../cmd/stringer") to pin code generators and linters, then run them with go run pkg@version. Fix: In //go:generate lines use go tool…