When you try to run the command npx create-react-app
and proceed to install the dependencies with npm
it returns an error code
ERESOLVE Unable to resolve dependency tree as it generates the package.json
with React version 19 but @testing-library/[email protected] is compatible
exclusively with React 18.
When you try to run the command npx create-react-app
and proceed to install the dependencies with npm
it returns an error code
ERESOLVE Unable to resolve dependency tree as it generates the package.json
with React version 19 but @testing-library/[email protected] is compatible
exclusively with React 18.
Share
Improve this question
edited yesterday
Heretic Monkey
12.1k7 gold badges61 silver badges131 bronze badges
asked Feb 17 at 16:05
Shripad KhandareShripad Khandare
233 bronze badges
New contributor
Shripad Khandare is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2
- ....*ahem. You might want to pick something else... – Jared Smith Commented Feb 17 at 16:09
- I recommend vite – vitxr Commented yesterday
2 Answers
Reset to default 1Create React App
command is deprecated
Alternatively, you can use Vite. Simply run npm create vite@latest
in your terminal and select your desired React configuration.
E.g:
Use "npm install --legacy-peer-deps" in the terminal.