Home > Net >  You are running `create-react-app` 5.0.0, which is behind the latest release (5.0.1)
You are running `create-react-app` 5.0.0, which is behind the latest release (5.0.1)

Time:04-14

[I got an error while creating a React application. How do I fix it?

Microsoft Windows [Version 10.0.19044.1586] (c) Microsoft Corporation. All rights reserved.

C:\Users\Olususi Victor>cd documents

C:\Users\Olususi Victor\Documents>cd react folder

C:\Users\Olususi Victor\Documents\React folder>npx create-react-app blog

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

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/

C:\Users\Olususi Victor\Documents\React folder>

CodePudding user response:

Have you installed react globally? if yes, then remove it using

npm uninstall -g create-react-app

and then run your

npx create-react-app blog

if still you face the same issue than try creating a blog folder and inside that folder, run

npx create-react-app .

may be it will fix your issue.

CodePudding user response:

Run the following 3 commands sequentially:

npm uninstall -g create-react-app
npx clear-npx-cache
npx create-react-app@latest my-app

CodePudding user response:

I also encountered this problem and by installing the package with yarn, everything works! Even removing then reinstalling with npm, it didn't work. Here is my solution

yarn add create-react-app
create-react-app {app_name}
  • Related