Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(React 19) Failing npm i without --legacy-peer-deps flag #3187

Open
RC-Pella opened this issue May 16, 2024 · 0 comments
Open

(React 19) Failing npm i without --legacy-peer-deps flag #3187

RC-Pella opened this issue May 16, 2024 · 0 comments

Comments

@RC-Pella
Copy link

Current behavior:
npm install fails without --legacy-peer-deps flag due to emotion packages.

npm i
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @emotion/react@11.11.4
npm ERR! Found: react@19.0.0-beta-26f2496093-20240514
npm ERR! node_modules/react
npm ERR!   react@"^19.0.0-beta-26f2496093-20240514" from the root project
npm ERR!   peer react@"19.0.0-beta-26f2496093-20240514" from react-dom@19.0.0-beta-26f2496093-20240514
npm ERR!   node_modules/react-dom
npm ERR!     react-dom@"^19.0.0-beta-26f2496093-20240514" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@">=16.8.0" from @emotion/react@11.11.4
npm ERR! node_modules/@emotion/react
npm ERR!   @emotion/react@"^11.11.4" from the root project
npm ERR!   peer @emotion/react@"^11.0.0-rc.0" from @emotion/styled@11.11.5
npm ERR!   node_modules/@emotion/styled
npm ERR!     @emotion/styled@"^11.11.5" from the root project
npm ERR!     3 more (@mui/material, @mui/styled-engine, @mui/system)
npm ERR!   3 more (@mui/material, @mui/styled-engine, @mui/system)
npm ERR! 
npm ERR! Conflicting peer dependency: react@18.3.1
npm ERR! node_modules/react
npm ERR!   peer react@">=16.8.0" from @emotion/react@11.11.4
npm ERR!   node_modules/@emotion/react
npm ERR!     @emotion/react@"^11.11.4" from the root project
npm ERR!     peer @emotion/react@"^11.0.0-rc.0" from @emotion/styled@11.11.5
npm ERR!     node_modules/@emotion/styled
npm ERR!       @emotion/styled@"^11.11.5" from the root project
npm ERR!       3 more (@mui/material, @mui/styled-engine, @mui/system)
npm ERR!     3 more (@mui/material, @mui/styled-engine, @mui/system)
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.

To reproduce:

  1. Upgrade React to v19
  2. npm i

Expected behavior:
successful npm install

Environment information:

  • react version: ^19.0.0-beta-26f2496093-20240514
  • @emotion/react version: ^11.11.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant