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

npx create-react-app conflicts with react 19 #13911

Open
BasmaElhoseny01 opened this issue Jan 16, 2025 · 7 comments
Open

npx create-react-app conflicts with react 19 #13911

BasmaElhoseny01 opened this issue Jan 16, 2025 · 7 comments

Comments

@BasmaElhoseny01
Copy link

Current system Versions

npm -v -->11.0.0
npx -v --> 11.0.0

Run

npx create-react-app simple-app

Error

Installing template dependencies using npm...
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/react
npm error react@"^19.0.0" from the root project
npm error
npm error Could not resolve dependency:
npm error peer react@"^18.0.0" from @testing-library/[email protected]
npm error node_modules/@testing-library/react
npm error @testing-library/react@"^13.0.0" from the root project

Explaination

Issue with the newer react version 19 :D

@LautaroLobo12
Copy link

encountered the same issue

@stackcv
Copy link

stackcv commented Jan 20, 2025

Issue persists.
npm --> 10.9.0
npx --> 10.9.0

@justincrich
Copy link

Same issue... any workaround?

@LautaroLobo12
Copy link

it seems like create-react-app is unmantained. maybe use vite instead?

@lperezp
Copy link

lperezp commented Jan 21, 2025

If you downgrade to version 18.3.1 you can run normally.

  "dependencies": {
    "cra-template": "1.2.0",
    "react": "18.3.1",
    "react-dom": "18.3.1",
    "react-scripts": "5.0.1",
    "web-vitals": "^4.2.4"
  },

@carrey493
Copy link

I have encountered the same problem. Is there a successful solution?

@lperezp
Copy link

lperezp commented Jan 27, 2025

@carrey493 you can use Vite or downgrade react to version 18.3.1

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

7 participants
@justincrich @lperezp @stackcv @LautaroLobo12 @carrey493 @BasmaElhoseny01 and others