Home > Back-end >  In Vscode I am facing a problem while creating a react app
In Vscode I am facing a problem while creating a react app

Time:01-07

I have used the command

> npx create-react-app my-app

Need to install the following packages:
  create-react-app
Ok to proceed? (y)
 // I apply the command but the result is
Ok to proceed? (y) y

You are running `create-react-app` 4.0.3, which is behind the latest release (5.0.0).

We no longer support global installation of Create React App.

Please remove any global installs with one of the following commands:
- npm uninstall -g create-react-app
- yarn global remove create-react-app

The latest instructions for creating a new app can be found here:
https://create-react-app.dev/docs/getting-started/

CodePudding user response:

Try running npx clear-npx-cache to clear cache and then running npx create-react-app@latest my-app --use-npm to install latest version

CodePudding user response:

First, check your npm version with command npm --version to see if it is because your npm version is too old (mine is 6.14.14).Reinstall npm to see if it solves the problem.

If it doesn't, try to uninstall the create-react-app as the document suggests, using npm uninstall -g create-react-app, and YOU DON'T NEED TO INSTALL IT! npm will take care of this for you.

These are the two suggestions I can think of so far.

  •  Tags:  
  • Related