1

I was creating my first React app using this command mentioned on react.dev website:

npx create-react-app my-app

and it is throwing 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
PS D:\Project\React Course> npx uninstall react react-dom

npm error A complete log of this run can be found in: C:\Users\tanma\AppData\Local\npm-cache_logs\2024-12-25T08_07_29_799Z-debug-0.log
  • Node version - 22.12.0
  • npm version - 10.9.0
2
  • 1
    This question is similar to: Error in creating new react app using create-react-app appname. If you believe it’s different, please edit the question, make it clear how it’s different and/or how the answers on that question are not helpful for your problem. Commented Dec 25, 2024 at 9:41
  • And I'm pretty sure CRA is mentioned nowhere on react.dev, as it's been unsupported for a whole. Commented Dec 25, 2024 at 9:43

1 Answer 1

1

Same erorr Try to do it with vite

npm create vite@latest
Sign up to request clarification or add additional context in comments.

2 Comments

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
this alternative for creating the react app worked for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.