Gatsby v5's Node.js 18 requirement blocks CI upgrades for legacy projects
0 reputation · 17 May 2023, 08:02 UTC
Context
Projects still running Node.js 14 or 16 cannot install or execute Gatsby v5 due to the hard engines constraint. This affects build scripts, plugin compatibility, and any automated pipeline that hasn't been migrated to a newer runtime.
Constraint
The engines field in Gatsby v5's package.json specifies >=18.0.0, and npm 9+, pnpm, and yarn enforce this by default. Legacy CI images like node:14 or pre-2022 ubuntu-latest will fail at install time with EBADENGINE errors.
Unresolved Decision
For organizations maintaining monorepos or services with mixed Node.js requirements, the upgrade path is unclear. Isolating toolchains with nvm, volta, or fnm adds complexity, while Docker-based builds require maintaining separate images for Gatsby versus other services.
Questions
<- Should teams pin Gatsby to v4 for legacy Node.js support, or invest in a coordinated runtime upgrade across all services?
- How can CI caching strategies be reconfigured to prevent false-positive installs when engines checks are bypassed?
- Is there a recommended approach for handling native module rebuilds (e.g., sharp) during the transition to Node.js 18+?