question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue while trying to create new project

See original GitHub issue

npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: react-complete-guide@0.1.0 npm ERR! Found: react@18.0.0 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/react@12.1.5 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 failed

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:11
  • Comments:12

github_iconTop GitHub Comments

5reactions
morenoisidrocommented, Apr 12, 2022

This should be solved after the recent v5.0.1 release. Try running npx create-react-app again.

4reactions
dhruv-panchal211commented, Apr 26, 2022

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’; import {createRoot} from ‘react-dom/client’; import ‘./index.css’; import App from ‘./App’; // import reportWebVitals from ‘./reportWebVitals’;

const container = document.getElementById(‘root’); const root = createRoot(container)

root.render( <React.StrictMode> <App /> </React.StrictMode>, )

// If you want to start measuring performance in your app, pass a function // to log results (for example: reportWebVitals(console.log)) // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals // reportWebVitals();

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting an error while creating a new project in VS2019
After integration with ClearCase, when we create a new project, we are getting a error message dialog of Visual Studio. The error says...
Read more >
Why can't I create issues under new projects
It sounds like you do not have permission to Browse the project, therefore cannot create new or see anything in that project. However...
Read more >
Xcode 11 unresponsive when trying - Apple Developer
The xcode gets unresponsive everytime I want to create a new file or project. I can open existing projects but cannot create any...
Read more >
problem opening a new project on VS 2019 and adding a new ...
I am beginner programmer using visual studio 2019 and i cant open a new project on my visual studio, cause every time it...
Read more >
Cannot create a new project in AutoCAD Electrical
Issue: When attempting to create a new project in AutoCAD Electrical, a blank error appears and no project is created.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found