1

I am a beginner using React, and when I try to create a project in VSCode with npx create-react-app app I get this error:

PS C:\Users\USER\Desktop\folder> npx create-react-app app
Creating a new React app in C:\Users\USER\Desktop\folder\app.

Installing packages. This might take a couple minutes.
Installing react, react-dom, and react-scripts...     

npm WARN deprecated @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-numeric-separator instead.
npm WARN deprecated @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.
npm WARN deprecated @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead.
npm WARN deprecated @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-methods instead. 
npm WARN deprecated [email protected]: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead.
npm WARN deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser
npm WARN deprecated [email protected]: Please use @jridgewell/sourcemap-codec instead
npm WARN deprecated [email protected]: Use your platform's native performance.now() and performance.timeOrigin.
npm WARN deprecated [email protected]: [email protected]
npm WARN deprecated [email protected]: This SVGO version is no longer supported. Upgrade to v2.x.x.

added 1452 packages, and audited 1453 packages in 1m

6 high severity vulnerabilities

To address all issues, run:
  npm audit fix

Run `npm audit` for details.

A template was not provided. This is likely because you're using an outdated version of create-react-app.
Please note that global installs of create-react-app are no longer supported.
You can fix this by running npm uninstall -g create-react-app or yarn global remove create-react-app before using create-react-app again.

And it just created the node_modules, package-lock.json and the package.json files:

{
  "name": "app",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "react": "^18.2.0",
    "react-dom": "^18.2.0"
  },
  "devDependencies": {
    "react-scripts": "5.0.1"
  }
}

I also tried a lot of solutions given on some forums like:

  • npm install -g create-react-app
  • npm cache clean --force
  • npm uninstall -g create-react-app
  • npm uninstall create-react-app

But nothing has worked so far...

2 Answers 2

1

Just uninstall create-react-app

npm uninstall -g create-react-app

and try again...

npx create-react-app <AppName>
Sign up to request clarification or add additional context in comments.

2 Comments

what if we dont want to delete whole project, means I have an old project and working on it for more than 3 months and now showing me this error, How to deal with it then?
Why are you running this on an old project? create-react-app command is the command used to create a new React project.
0

I had the same issue and what worked for me was

npm uninstall -g react-native-cli

and then

npx react-native init your-appName

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.