-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Issue while trying to create new project #12279
Comments
that's the first time I try to use react so I don't know what any of those errors means |
hola , en un grupo de facebook un usuario me compartio esta solucion: importar React desde 'react'; </React.StrictMode>, ); luego puedes ejecutar npm start sin problemas |
I found the solution. create-react-app is not updating index.js as per the new react V18 so you need to modify index.js file as follow import React from 'react'; const container = document.getElementById('root'); root.render( // If you want to start measuring performance in your app, pass a function |
The ERESOLVE error specifically seems to have been caused by react-testing-library's 12.1.5 release yesterday, which doesn't support React 18. It looks like there is a PR already to fix this |
This should be solved after the recent v5.0.1 release. Try running |
I have also encountered with this error yesterday but today the
is not working fine but it now ask to install |
This worked out in my case. Beforew creating the app first run this: npm config set legacy-peer-deps true Then run: npx create-react-app my-app Explanation: |
Helps me a lot. |
This is the answer I was looking for. |
As far as I understand, the original issue posted by @elementkz was fixed in create-react-app 5.0.1 (release) This can probably be closed. |
Temporary fix:
... before call create-react-app. And in |
This worked out in my case. Beforew creating the app first run this: npm config set legacy-peer-deps true Then run: npx create-react-app my-app Explanation: This worked for me thanks |
I also faced the same issue and I simply solved it by reinstalling the latest version of node. |
Hi, I posted it in april last year. |
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR! react@"^18.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"<18.0.0" from @testing-library/[email protected]
npm ERR! node_modules/@testing-library/react
npm ERR! @testing-library/react@"^12.0.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\adamr\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\adamr\AppData\Local\npm-cache_logs\2022-04-12T04_05_01_315Z-debug-0.log
npm install --no-audit --save @testing-library/jest-dom@^5.14.1 @testing-library/react@^12.0.0 @testing-library/user-event@^13.2.1 web-vitals@^2.1.0
failedThe text was updated successfully, but these errors were encountered: