Skip to content

@reduxjs/toolkit is not compatible with the official React 19 release #4759

@JesusVergara89

Description

@JesusVergara89

Hello,

I encountered an issue while attempting to use @reduxjs/toolkit with the newly released React 19. The installation fails due to peer dependency conflicts, as @reduxjs/toolkit currently specifies compatibility only with React versions ^16.9.0, ^17.0.0, or ^18.

Here is the error message:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @reduxjs/toolkit@2.4.0
npm ERR! Found: react@19.0.0
npm ERR! node_modules/react
npm ERR! peer react@"^19.0.0" from react-dom@19.0.0
npm ERR! node_modules/react-dom
npm ERR! react-dom@"^19.0.0" from the root project
npm ERR! peer react@">= 16" from react-scripts@5.0.1
npm ERR! node_modules/react-scripts
npm ERR! react-scripts@"5.0.1" from the root project
npm ERR! 1 more (the root project)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional react@"^16.9.0 || ^17.0.0 || ^18" from @reduxjs/toolkit@2.4.0
npm ERR! node_modules/@reduxjs/toolkit
npm ERR! @reduxjs/toolkit@"" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react@18.3.1
npm ERR! node_modules/react
npm ERR! peerOptional react@"^16.9.0 || ^17.0.0 || ^18" from @reduxjs/toolkit@2.4.0
npm ERR! node_modules/@reduxjs/toolkit
npm ERR! @reduxjs/toolkit@"
" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! /Users/jesusvergara/.npm/_logs/2024-12-09T20_41_42_736Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: /Users/jesusvergara/.npm/_logs/2024-12-09T20_41_42_736Z-debug-0.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions