You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: creation reactjs new project latest so v19 #31701
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
added 1315 packages in 10m
261 packages are looking for funding
run npm fund for details
Initialized a git repository.
Installing template dependencies using npm...
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: module_loginweb_reactjs@0.1.0
npm error Found: react@19.0.0
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/react@13.4.0
npm error node_modules/@testing-library/react
npm error @testing-library/react@"^13.0.0" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /.../.npm/_logs/2024-12-08T06_26_18_730Z-eresolve-report.txt
npm error A complete log of this run can be found in: ..
I am also facing this issue. I think the create-react-app you are trying to set up is using react@19.0.0, but @testing-library/react@13.4.0 requires react@^18.0.0.
Why is this issue marked as closed?
Using yarn instead of npx is not an excuse for fixing this bug
Reacted by Jérémie Uzan, Josh Wedekind, Thomas Salmon, Daksh Verma, Rick Huang, Rainyan, john, ElessarWillomoont, Petar Gyurov, Nikos Katsos and 32 more
The official documentation recommends npx create-react-app my-app as the way to create a project. And that is not working anymore. It seams to me that we have a major bug.
Reacted by ElessarWillomoont, Petar Gyurov, GCrane93, Danilo Almeida Milhome, Ardian Umam, Yan Wittmann, 김민범, Njoroge, Dmitriy Loburets, zacharyvici and 5 more
Did not solve npx create-react-app app_name but manually changing the @testing-library/react to version 16.1.0 works for me. Seems like it's the compatible version with react 19
The same issue for me with npx (npx create-react-app my-app --template typescript),
but it works with yarn (yarn create react-app my-app --template typescript)
I have been facing the same issue for the last two weeks. React v19 is making the process of creating a React app difficult and frustrating. I wonder what new learners must be going through.
Activity
Kajanan02 commentedon Dec 12, 2024
I am also facing this issue. I think the create-react-app you are trying to set up is using react@19.0.0, but @testing-library/react@13.4.0 requires react@^18.0.0.
Productivix commentedon Dec 12, 2024
I solved that by :
yarn create react-app module
toyota-167 commentedon Dec 13, 2024
The issue has solved finally. thank you very much.


Productivix commentedon Dec 13, 2024
yes but it not quite solved by a "documented command" , but I am not on the right package name in fact . I will propagate
toyota-167 commentedon Dec 13, 2024
When things are settled, that's it.
sankalpie commentedon Dec 13, 2024
Why is this issue marked as closed?
Using yarn instead of npx is not an excuse for fixing this bug
MagicFame commentedon Dec 13, 2024
Agree, we should fix this instead of accepting a problem
Productivix commentedon Dec 14, 2024
hi, agree, in fact I recreated it there as son as I closed, with a link here : react/create-react-app#13726 6 but this repo has so many issues !!
lcrespilho commentedon Dec 18, 2024
This is not a solution. Definitely not.
The official documentation recommends
npx create-react-app my-appas the way to create a project. And that is not working anymore. It seams to me that we have a major bug.galuhalifani commentedon Dec 20, 2024
Did not solve
npx create-react-app app_namebut manually changing the@testing-library/reactto version16.1.0works for me. Seems like it's the compatible version with react 19rm -rf node_modules package-lock.jsonnpm installno errors on this
avithe1 commentedon Dec 23, 2024
I wanted to create-react-app with typescript template and RTL but ran into this same issue.
Had to install RTL manually with types using command :
npm install --save-dev @testing-library/react @testing-library/dom @testing-library/jest-dom @testing-library/user-event @types/react @types/react-dom @types/jest @types/node --legacy-peer-depspetervn commentedon Dec 25, 2024
I have same issue
volodymyrd commentedon Dec 25, 2024
The same issue for me with npx (npx create-react-app my-app --template typescript),
but it works with yarn (yarn create react-app my-app --template typescript)
3 remaining items
IftekharulAlam commentedon Jan 4, 2025
having same issue
sankalpie commentedon Jan 4, 2025
Guys I use this trick to fix this issue:
npx create-react-app .
npm uninstall react react-dom
npm install react@18.2.0 react-dom@18.2.0
npm install --legacy-peer-deps
npm install web-vitals
Kajanan02 commentedon Jan 4, 2025
It's install React 18 but default version is 19.
njoro-njoroge commentedon Jan 5, 2025
I have been facing the same issue for the last two weeks. React v19 is making the process of creating a React app difficult and frustrating. I wonder what new learners must be going through.
villanuevadani commentedon Jan 7, 2025
Hey people, anyone found a solution for this? When using
typescripttemplate, I do not manage to solve the issuesMelissaTrimarco commentedon Jan 7, 2025
Use:
npm config set legacy-peer-deps true
I got this from https://www.youtube.com/watch?v=glM8CBthVVg and is working for me now.
AoiSakuraLab commentedon Jan 7, 2025
Completely new to React and facing the same issue now, and this just work for me!
yuridicarlo commentedon Jan 9, 2025
also for me, but I got this new problem, not related to the precedent...
Cannot find module 'ajv/dist/compile/codegen'
Require stack:
AoiSakuraLab commentedon Jan 9, 2025
Also for me, and I ran
npm list ajvTo check for the version then
npm install --save-dev ajv@^8(replace 8 with the version it shows)and fixed it.
yuridicarlo commentedon Jan 10, 2025
my story is that I ran
npm install ajv --save-devthen a bulk update for everythying
npx npm-check-updates -uPLUS
npm installand with another
npm start...magically, everything was resolved and wrked so fine! now, ready for the next battle :-D
killermountain commentedon Jan 13, 2025
THis worked for me
Akshit0703 commentedon Jan 16, 2025
yes it works
Edit: for me, doing this so i dont anger the dev gods
IbrahimZawra commentedon Jan 25, 2025
The only one worked for me
IbrahimZawra commentedon Jan 25, 2025
this bug appeared again when tried to install axios. pretty annoying.
164168AhmedSohail commentedon Jan 29, 2025
Resolved the issue and template to start with react 19
https://github.com/164168AhmedSohail/React-19-working-solution-with-template