remix-run/react-router · warning
️⚠️ Oops, Node v${versions.node} detected. react-router requ
Error message
️⚠️ Oops, Node v${versions.node} detected. react-router requires a Node version greater than ${MINIMUM_NODE_VERSION}. What it means
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.
Source
Thrown at packages/react-router-dev/cli/run.ts:117
}
/**
* Programmatic interface for running the react-router CLI with the given command line
* arguments.
*/
export async function run(
argv: string[] = process.argv.slice(2),
{ isMain = false }: { isMain?: boolean } = {},
) {
// Check the node version
let versions = process.versions;
let MINIMUM_NODE_VERSION = "22.22.0";
if (
versions &&
versions.node &&
semver.lt(versions.node, MINIMUM_NODE_VERSION)
) {
console.warn(
`️⚠️ Oops, Node v${versions.node} detected. react-router requires ` +
`a Node version greater than ${MINIMUM_NODE_VERSION}.`,
);
}
let isBooleanFlag = (arg: string) => {
let index = argv.indexOf(arg);
let nextArg = argv[index + 1];
return !nextArg || nextArg.startsWith("-");
};
let { values, positionals } = parseArgs({
args: argv,
allowPositionals: true,
options: {
assetsInlineLimit: { type: "string" },
clearScreen: { type: "boolean" },
config: { type: "string", short: "c" },View on GitHub (pinned to 6beaca3952)
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
Example fix
// before - package.json
{
"engines": { "node": ">=20" }
}
// after
{
"engines": { "node": ">=22.22.0" }
} Defensive patterns
Strategy: validation
Validate before calling
// gate before invoking the CLI
import semver from "semver";
if (semver.lt(process.versions.node, "22.22.0")) {
throw new Error(`Node >= 22.22.0 required, running ${process.versions.node}`);
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- "${color.bold(template)}" is an invalid template. Run ${colo
- The provided template is not a valid local directory or tarb
- There was a problem extracting the file from the provided te
- There was a problem fetching the file${isGithubUrl ? " from
- There was a problem extracting the file from the provided te
AI-assisted analysis of remix-run/react-router@6beaca3952 (2026-08-18).
Data as JSON: /api/errors/2897d6cd9809a22c.
Report an issue: GitHub.