{"record":{"id":"b9325a8c2ff49451","repo":"gatsbyjs/gatsby","slug":"gatsby-requires-node-js-min-node-version-or-hig","errorCode":null,"errorMessage":"Gatsby requires Node.js ${MIN_NODE_VERSION} or higher (you have ${version}).\n      Upgrade Node to the latest stable release: https://gatsby.dev/upgrading-node-js","messagePattern":"Gatsby requires Node\\.js (.+?) or higher \\(you have (.+?)\\)\\.\n      Upgrade Node to the latest stable release: https://gatsby\\.dev/upgrading-node-js","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"packages/gatsby-cli/src/index.ts","lineNumber":32,"sourceCode":"}\n\n// Ensure stable runs on Windows when started from different shells (i.e. c:\\dir vs C:\\dir)\nif (os.platform() === `win32`) {\n  ensureWindowsDriveLetterIsUppercase()\n}\n\n// @ts-ignore - TODO: Remove _CFLAGS_ again\nconst MIN_NODE_VERSION = _CFLAGS_.GATSBY_MAJOR === `5` ? `18.0.0` : `14.15.0`\n// const NEXT_MIN_NODE_VERSION = `10.13.0`\n\nconst { version } = process\n\nif (\n  !semver.satisfies(version, `>=${MIN_NODE_VERSION}`, {\n    includePrerelease: true,\n  })\n) {\n  report.panic(\n    report.stripIndent(`\n      Gatsby requires Node.js ${MIN_NODE_VERSION} or higher (you have ${version}).\n      Upgrade Node to the latest stable release: https://gatsby.dev/upgrading-node-js\n    `)\n  )\n}\n\nif (semver.prerelease(version)) {\n  report.warn(\n    report.stripIndent(`\n    You are currently using a prerelease version of Node (${version}), which is not supported.\n    You can use this for testing, but we do not recommend it in production.\n    Before reporting any bugs, please test with a supported version of Node (>=${MIN_NODE_VERSION}).`)\n  )\n}\n\n// if (!semver.satisfies(version, `>=${NEXT_MIN_NODE_VERSION}`)) {\n//   report.warn(","sourceCodeStart":14,"sourceCodeEnd":50,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/8b06340921ffdf23125a365b9c9923690cb62ce6/packages/gatsby-cli/src/index.ts#L14-L50","documentation":"Enforced at CLI startup via `semver.satisfies(process.version, '>=MIN_NODE_VERSION')`. For Gatsby major 5 the floor is Node 18.0.0; for earlier majors it is 14.15.0. If the running Node does not meet the floor, the CLI panics before doing any work.","triggerScenarios":"Invoking any gatsby CLI command under a Node version below the required floor (e.g. Node 16 with Gatsby 5, or Node 12 with Gatsby 4).","commonSituations":"CI image pinned to an old Node LTS; `nvm`/`volta`/`n` shell not switched to the project's Node; deploying to a host whose default Node is below the floor; local Node not updated after a Gatsby major upgrade.","solutions":["Upgrade Node to the latest LTS (>=18 for Gatsby 5): use `nvm install --lts`, `volta install node@lts`, or your platform installer.","Pin the Node version in the project (`.nvmrc`, `package.json#engines`, or `volta` pin) and ensure shells load it.","Update CI to use a Node version that satisfies the floor (e.g. `actions/setup-node` with `node-version: 18`).","Confirm `node -v` in the failing environment before re-running gatsby."],"exampleFix":"# before: Node 16 with Gatsby 5\nnode -v  # v16.x\n\n# after\nnvm install 18\nnvm use 18\nnode -v  # v18.x\ngatsby develop","handlingStrategy":"validation","validationCode":"const semver = require('semver')\nconst MIN = '18.0.0' // Gatsby 5\nif (!semver.satisfies(process.version, `>=${MIN}`, { includePrerelease: true })) {\n  throw new Error(`Node >= ${MIN} required (have ${process.version})`)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin Node to the latest LTS in `.nvmrc`/`package.json#engines`.","Switch Node via nvm/volta/n before running gatsby.","Use a CI image with a Node version above the floor."],"tags":["cli","node-version","environment","startup","semver"],"backgroundTag":null,"analyzedSha":"8b06340921ffdf23125a365b9c9923690cb62ce6","analyzedAt":"2026-08-13T02:36:21.405Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}