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

CRA failing with React 18 #64

Closed
chrismowbraybv opened this issue Mar 30, 2022 · 2 comments
Closed

CRA failing with React 18 #64

chrismowbraybv opened this issue Mar 30, 2022 · 2 comments

Comments

@chrismowbraybv
Copy link

Hey, I'm trying to spin up a new app using the following:

npx create-react-app my-app --template redux-typescript

and seeing this error even when using --force or --legacy-peer-deps

Installing template dependencies using npm...
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"^18.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.3 || ^17" from [email protected]
npm ERR! node_modules/react-redux
npm ERR!   react-redux@"^7.2.0" 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! See /Users/christopher.mowbray/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/christopher.mowbray/.npm/_logs/2022-03-30T10_07_21_210Z-debug.log
`npm install --no-audit --save @reduxjs/toolkit@^1.5.1 @testing-library/react@^9.3.2 @testing-library/jest-dom@^4.2.4 @testing-library/user-event@^7.1.2 @types/node@^12.0.0 @types/react@^16.9.0 @types/react-dom@^16.9.0 @types/react-redux@^7.1.7 @types/jest@^24.0.0 react-redux@^7.2.0 typescript@~4.1.5` failed
@markerikson
Copy link
Contributor

Yeah, it's an unfortunate combination of CRA + NPM behavior.

Tracking this in reduxjs/react-redux#1881 , and related thoughts at reduxjs/react-redux#1740 (comment).

@chrismowbraybv
Copy link
Author

Cheers @markerikson!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants