Install & Setup

React Router System Requirements and Compatibility

React Router compatibility checklist with Node.js, React and browser versions

Most React Router install problems are not bugs. They are version mismatches: an older Node.js, an older React, or a tool that expects CommonJS. This page lists the React Router requirements for the current release, compares them with earlier major versions, and covers the tools around it so you can check your setup before installing anything.

Facts on this page come from the published packages and were last checked on 1 December 2026, when React Router 8.5.3 was the latest release.

React Router 8 requirements at a glance

RequirementMinimumHow to check
React19.2.7npm ls react
React DOM19.2.7npm ls react-dom
Node.js22.22.0node -v
Module systemES modules"type": "module" in package.json, or a bundler
TypeScript (optional)Types included; Framework tooling supports TS 5.1 to 7npx tsc -v
Vite (Framework Mode only)7 or 8npm ls vite

React's type packages (@types/react and @types/react-dom 19.2+) are optional peer dependencies. You only need them in TypeScript projects.

Requirements by major version

If you cannot meet the v8 requirements yet, an earlier major version may fit your stack. Here is how they compare:

VersionReactNode.jsPackage to installStatus
v8 (8.5.3)19.2.7+22.22.0+react-routerCurrent
v7 (7.18.7)18+20+react-router (or react-router-dom)Maintained
v6 (6.30.x)16.8+14+react-router-domOlder line

The practical rule: React 19 projects should use v8, React 18 projects should use v7, and anything older should plan a React upgrade before touching the router.

Why the Node.js requirement matters even for front-end apps

You might think Node.js only matters on a server. But your package manager, Vite, the dev server and the production build all run on Node.js. React Router 8's packages declare "node": ">=22.22.0", so npm prints an EBADENGINE warning on older versions, and the Framework Mode tooling can fail outright. In Framework Mode with server rendering, Node.js also runs your app in production.

If you host on a platform that picks a Node.js version for you (many serverless platforms do), set it explicitly to 22 or newer in the platform settings or with an "engines" field in your own package.json.

ES modules only

React Router 8 is published as ES modules only. For most projects this changes nothing: Vite, modern webpack, Rspack, esbuild and Parcel all handle ESM natively, and current Node.js can load ES modules from CommonJS.

Where it can bite is older test setups. If a Jest configuration does not transform ES modules, you may see SyntaxError: Cannot use import statement outside a module. The usual fixes are switching to Vitest, or configuring Jest's ESM support and adjusting transformIgnorePatterns so react-router is transformed.

Bundlers and build tools

  • Framework Mode runs through the Vite plugin in @react-router/dev, which supports Vite 7 and Vite 8.
  • Declarative and Data modes are plain libraries. They work with Vite, webpack 5, Rspack, Parcel, esbuild or any bundler that supports ES modules and the package exports field.
  • TypeScript definitions ship inside the package, so there is no separate @types package for React Router.

Operating systems and editors

React Router is platform-independent JavaScript. Development works the same on Windows 10 and 11, macOS and any mainstream Linux distribution, on both x64 and ARM (including Apple silicon). On Windows, both PowerShell and WSL work; WSL tends to give faster file watching on large projects.

Any editor with good TypeScript support works well. VS Code, WebStorm, Zed and Neovim with a TypeScript language server all give you autocomplete for route APIs, and in Framework Mode they pick up the generated route types automatically.

Browser support

Apps built with React Router run in all current browsers: Chrome, Edge, Firefox and Safari on desktop, plus Chrome on Android and Safari on iOS. Client-side navigation relies on the standard History API, which every modern browser supports. Internet Explorer is not supported by React 19, so it is not supported here either.

Hosting compatibility

Hosting typeWorks?Notes
Static hosting (SPA)YesConfigure a fallback so every path serves index.html.
Node.js serverYesFramework Mode SSR via @react-router/serve or your own Express server.
Serverless and edge platformsYesCommunity and official adapters exist for the major platforms; Cloudflare Workers is supported by the tooling.
Shared PHP hostingSPA onlyUpload the built static files and add a rewrite rule to index.html.

Upgrading Node.js and React without breaking things

If your stack is below the v8 minimums, upgrade in this order so each step is easy to test:

  1. Node.js first. Install Node.js 22.22 or newer with a version manager (nvm, fnm or Volta) so you can switch back if needed. Add an .nvmrc or .node-version file to the project so teammates use the same version. Re-run your build and tests.
  2. React next. Run npm i react@latest react-dom@latest. React 19 removed some long-deprecated APIs, so read its upgrade notes and fix warnings before going further.
  3. React Router last. If you are on v6, move to v7 first and turn on its future flags. Then install v8 and update the imports.

Upgrading one layer at a time means that when something breaks, you know exactly which change caused it.

Checking requirements in CI

Local machines are not the only place versions drift. Build servers often run an older Node.js image than your laptop. Pin the version in your CI configuration (for example node-version: 22 in a GitHub Actions setup step) and add an "engines" field to your own package.json:

"engines": {
  "node": ">=22.22.0"
}

Combined with npm config set engine-strict true, installs on an unsupported Node.js version fail immediately with a clear message instead of producing a broken build later.

React Native and other renderers

React Router 7 and 8 target the web. The old react-router-native package stopped at the v6 line, so for React Native apps a native navigation library is the better choice.

Quick compatibility check before you install

node -v           # needs v22.22.0 or newer
npm ls react      # needs 19.2.7 or newer for v8
npm ls react-dom  # same as react
npm ls vite       # Framework Mode: 7.x or 8.x

All good? Follow How to Download and Install React Router to install it. If the install still fails, React Router not working? Common errors and fixes walks through the exact error messages.

Download React Router 8.5.3

Planning an upgrade between major versions? React Router versions and updates explains what changed in v7 and v8 and how to move safely.

Get React Router 8.5.3: one npm command, or the verified package download.

Download

Tivari

Professional content writer

Tivari is a professional content writer who covers web development tools, with a focus on turning technical documentation into clear, step-by-step articles. Every command and code sample in Tivari's articles is run against the current React Router release before publishing. About the writer and how we test.

Related articles