react-version.mdx


title: React Version Support description: Learn which React versions are supported by Next.js and how to upgrade.

Why This Error Occurred

Your project is using a version of react or react-dom that is unsupported or deprecated in your version of Next.js.

  • React versions earlier than 18.2.0 are unsupported.
  • React 18.2 and later remain supported in Next.js 16, but React 18 support is deprecated.
  • React 19 is recommended for Next.js 16 and will be required in Next.js 17.

React 19 includes features used by Next.js, such as Actions and improved hydration errors. Upgrade react and react-dom together to keep their versions in sync.

If you use TypeScript, upgrade @types/react and @types/react-dom at the same time.

Possible Ways to Fix It

Upgrade React and its TypeScript types with your package manager:

npm install react@latest react-dom@latest @types/react@latest @types/react-dom@latest
yarn add react@latest react-dom@latest @types/react@latest @types/react-dom@latest
pnpm add react@latest react-dom@latest @types/react@latest @types/react-dom@latest
bun add react@latest react-dom@latest @types/react@latest @types/react-dom@latest

Alternatively, update your package.json manually:

{
  "dependencies": {
    "react": "^19.0.0",
    "react-dom": "^19.0.0"
  },
  "devDependencies": {
    "@types/react": "^19.0.0",
    "@types/react-dom": "^19.0.0"
  }
}

Rendered from the public repository vercel/next.js on GitHub; content belongs to its authors. Cached for up to an hour.

errors/react-version.mdx · vercel/next.js | Docs MD