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
Solution (if keep using npm):
(a) downgrade to react 18
(b) keep using react 19 but use the latest version of testing-library/react.
npx create-react-app app_name still generates error, but then manually changing the @testing-library/react to version 16.1.0 works for me. Seems like it's the compatible version with react 19
you are able to use create-react-app but since it is a legacy code it will give you many errors on intalling and initializing the app.
After the error do cd nameYouCreated for the create react app.
Then inside the created-react-app you can do npm i and npm init. so you can continue the Process.
Then you should be able to do npm start and start the app.
This code is too old and non-compatible with the versions of React that we have available. Unfortunately older version of react that would be compatible are no longer available,
Guys no point trying to resolve this because its not really maintained. Not worth it. Above solutions did not work for me. Just use vite create-react-ts - https://vite.dev/guide/
I have the same issue
Installing template dependencies using npm...
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: frontend-movie5@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 C:\Users\zangn\AppData\Local\npm-cache_logs\2024-12-25T07_28_48_384Z-eresolve-report.txt
npm error A complete log of this run can be found in: C:\Users\zangn\AppData\Local\npm-cache_logs\2024-12-25T07_28_48_384Z-debug-0.log npm install --no-audit --save @testing-library/jest-dom@^5.14.1 @testing-library/react@^13.0.0 @testing-library/user-event@^13.2.1 web-vitals@^2.1.0 failed
PS E:\src\frontend-movie4>
Activity
mariomac commentedon Dec 16, 2024
Same error here. Using node v22.12.0 and npx 10.9.0, with nvm 0.40.1. On Mac OS 15.2 with M1 processor.
Type1J commentedon Dec 16, 2024
This is a duplicate of #13721.
PattemChaitanya commentedon Dec 17, 2024
Same here.
Two different kinds of scenarios occurred
Error message.

PerArneng commentedon Dec 17, 2024
Had the same issue when creating a typescript app. I ran the npm install manually with some updated package versions:
npm install --no-audit --save \ @testing-library/jest-dom@^6.6.3 \ @testing-library/react@^16.1.0 \ @testing-library/user-event@^14.5.2 \ @types/jest@^29.5.14 \ @types/node@^22.10.2 \ @types/react@^19.0.0 \ @types/react-dom@^19.0.0 \ typescript@^4.9.4 \ web-vitals@^4.2.4typescript 5.x does not work though because the latest react-scripts 5.0.1 has deps on typescript < 5.x
Deepak-raj-k commentedon Dec 18, 2024
I too faced the same error and i have resolved it by adding this command "npm install web-vitals"
ElessarWillomoont commentedon Dec 19, 2024
This problem seems to have been happening for weeks. I don't know why it still hasn't been fixed, but based on the issue here:
react/react#31701
Using the following command could be a temporary fix if it's really urgent:
galuhalifani commentedon Dec 20, 2024
Solution (if keep using npm):
(a) downgrade to react 18
(b) keep using react 19 but use the latest version of testing-library/react.
npx create-react-app app_namestill generates error, but then 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
menciusKael commentedon Dec 20, 2024
There are two solutions to the compatibility issue caused by using react19 version.
-> First remove the package lock file and node_modules
rm package-lock.json
rm -rf node_modules
-> Change the react deps from "^19.0.0" to "^18.0.0"
"react": "^18.0.0",
"react-dom": "^18.0.0",
->
npm i
->
npm install --save web-vitals
npm install --save-dev @testing-library/jest-dom @testing-library/react @testing-library/user-event
yarn create react-app my-app
delvissoto commentedon Dec 22, 2024
rm package-lock.json
rm -rf node_modules
you are able to use create-react-app but since it is a legacy code it will give you many errors on intalling and initializing the app.
After the error do cd nameYouCreated for the create react app.
Then inside the created-react-app you can do npm i and npm init. so you can continue the Process.
Then npm install --save web-vitals
npm install --save-dev @testing-library/jest-dom @testing-library/react @testing-library/user-event
Then you should be able to do npm start and start the app.
This code is too old and non-compatible with the versions of React that we have available. Unfortunately older version of react that would be compatible are no longer available,
asfand987 commentedon Dec 24, 2024
Guys no point trying to resolve this because its not really maintained. Not worth it. Above solutions did not work for me. Just use vite create-react-ts - https://vite.dev/guide/
petervn commentedon Dec 25, 2024
I have the same issue
Installing template dependencies using npm...
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: frontend-movie5@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 C:\Users\zangn\AppData\Local\npm-cache_logs\2024-12-25T07_28_48_384Z-eresolve-report.txt
npm error A complete log of this run can be found in: C:\Users\zangn\AppData\Local\npm-cache_logs\2024-12-25T07_28_48_384Z-debug-0.log
npm install --no-audit --save @testing-library/jest-dom@^5.14.1 @testing-library/react@^13.0.0 @testing-library/user-event@^13.2.1 web-vitals@^2.1.0failedPS E:\src\frontend-movie4>
yhojann-cl commentedon Dec 25, 2024
Wrong repository, the problem is not for React Scripts, is Testing Library for React: testing-library/react-testing-library#1372