create-react-app icon indicating copy to clipboard operation
create-react-app copied to clipboard

While Creating React Project - Dependency Resolution Issue

Open Nitish-UIUX opened this issue 10 months ago • 4 comments

The error occurred while running npx create-react-app my-app. The installation process failed due to an "ERESOLVE unable to resolve dependency tree" issue.

Image

Nitish-UIUX avatar Feb 08 '25 09:02 Nitish-UIUX

The latest create-react-app (CRA) installs React 19 by default, but @testing-library/[email protected] has a peer dependency requirement of React ^18.0.0, causing dependency conflicts. Using --template minimal resolves this issue as it creates a project without testing libraries, avoiding the version mismatch between React 19 and testing dependencies.

Workaround: Use npx create-react-app cra --template minimal to create a project without testing dependencies.

samuel871211 avatar Feb 09 '25 14:02 samuel871211

no matching version found for @babel/plugin-transform-for-of@^7.26.9 =(

kerosan avatar Feb 14 '25 15:02 kerosan

and minimal template not working

Image

need some refactoring

import React from 'react';
// import ReactDOM from 'react-dom';
import App from './App';
import { createRoot } from 'react-dom/client';


// ReactDOM.render(
//   <React.StrictMode>
//     <App />
//   </React.StrictMode>,
//   document.getElementById('root')
// );


const domNode = document.getElementById('root');
const root = createRoot(domNode);
root.render(<React.StrictMode><App /></React.StrictMode>);

kerosan avatar Feb 14 '25 15:02 kerosan

Please read docs CRA is deprecated

Create React App was one of the key tools for getting a React project up-and-running in 2017-2021, it is now in long-term stasis and we recommend that you migrate to one of React frameworks documented on Start a New React Project.

japusoy avatar May 26 '25 00:05 japusoy