{"record":{"id":"2897d6cd9809a22c","repo":"remix-run/react-router","slug":"oops-node-v-versions-node-detected-react-r","errorCode":null,"errorMessage":"️⚠️ Oops, Node v${versions.node} detected. react-router requires a Node version greater than ${MINIMUM_NODE_VERSION}.","messagePattern":"️⚠️ Oops, Node v(.+?) detected\\. react-router requires a Node version greater than (.+?)\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/react-router-dev/cli/run.ts","lineNumber":117,"sourceCode":"}\n\n/**\n * Programmatic interface for running the react-router CLI with the given command line\n * arguments.\n */\nexport async function run(\n  argv: string[] = process.argv.slice(2),\n  { isMain = false }: { isMain?: boolean } = {},\n) {\n  // Check the node version\n  let versions = process.versions;\n  let MINIMUM_NODE_VERSION = \"22.22.0\";\n  if (\n    versions &&\n    versions.node &&\n    semver.lt(versions.node, MINIMUM_NODE_VERSION)\n  ) {\n    console.warn(\n      `️⚠️ Oops, Node v${versions.node} detected. react-router requires ` +\n        `a Node version greater than ${MINIMUM_NODE_VERSION}.`,\n    );\n  }\n\n  let isBooleanFlag = (arg: string) => {\n    let index = argv.indexOf(arg);\n    let nextArg = argv[index + 1];\n    return !nextArg || nextArg.startsWith(\"-\");\n  };\n\n  let { values, positionals } = parseArgs({\n    args: argv,\n    allowPositionals: true,\n    options: {\n      assetsInlineLimit: { type: \"string\" },\n      clearScreen: { type: \"boolean\" },\n      config: { type: \"string\", short: \"c\" },","sourceCodeStart":99,"sourceCodeEnd":135,"githubUrl":"https://github.com/remix-run/react-router/blob/6beaca39526d5716c3c112ebb0782765baa5a9ce/packages/react-router-dev/cli/run.ts#L99-L135","documentation":"The CLI entrypoint (react-router bin → run()) compares process.versions.node against MINIMUM_NODE_VERSION \"22.22.0\" with semver.lt and prints this warning when lower. It is advisory only — the command still runs — but this React Router version is only tested on Node >= 22.22.0, and older runtimes (including older 22.x minors) can fail later in the build/dev pipeline in less obvious ways.","triggerScenarios":"Executing any `react-router` CLI command (`dev`, `build`, `create`, `reveal`, `routes`, ...) on Node < 22.22.0 — e.g., Node 20 LTS, or a 22.x minor below .22.0.","commonSituations":"CI images pinned to node:20 or an old node:22 tag; a stale `nvm` default alias; local dev machine never upgraded after bumping @react-router/dev; engines not enforced so the mismatch goes unnoticed until a cryptic runtime error.","solutions":["Upgrade the runtime to >= 22.22.0: `nvm install 22 && nvm alias default 22`, and update .nvmrc / CI image (e.g., node:22) accordingly","Enforce it fail-fast: add `\"engines\": { \"node\": \">=22.22.0\" }` to package.json plus `engine-strict=true` in .npmrc (or set engines in CI)","If upgrading now is impossible, downgrade @react-router/dev to a release whose Node floor you meet and plan the upgrade"],"exampleFix":"// before - package.json\n{\n  \"engines\": { \"node\": \">=20\" }\n}\n\n// after\n{\n  \"engines\": { \"node\": \">=22.22.0\" }\n}","handlingStrategy":"validation","validationCode":"// gate before invoking the CLI\nimport semver from \"semver\";\nif (semver.lt(process.versions.node, \"22.22.0\")) {\n  throw new Error(`Node >= 22.22.0 required, running ${process.versions.node}`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin \"engines\": { \"node\": \">=22.22.0\" } and enable engine-strict (.npmrc) so installs fail before runtime","Keep .nvmrc / CI images (node:22, updated) in sync with the framework's floor","Check the release notes' Node requirement when bumping @react-router/dev majors"],"tags":["node","cli","version","environment","semver"],"backgroundTag":"unsupported-node-version","analyzedSha":"6beaca39526d5716c3c112ebb0782765baa5a9ce","analyzedAt":"2026-08-18T18:04:14.938Z","contentChangedAt":"2026-08-18T18:04:14.938Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}