简体   繁体   中英

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

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>

Image of error

Run the following 3 commands sequentially:

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

MacOs 12.3.1 - Node v16.3.0 - NPM 7.15.1

I tried a lot of possible solutions, but the only one that worked for me was to uninstall CRA globally AND locally .

So, you have to run:

npm uninstall -g create-react-app

npm uninstall create-react-app

npx clear-npx-cache

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.

This worked for me

npm uninstall -g create-react-app
npm i create-react-app
npx create-react-app my-app

still not sure what happened thou

npx clear-npx-cache
npx create-react-app@latest app-name

Worked for me

Had this issue today (running node v16.13.1). Exact error message read:

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/

Solution that worked:

 1. npm uninstall -g create-react-app
 2. npm install -g create-react-app
 3. npm cache clean -f
 4. npx create-react-app my-app
  1. npm uninstall -g create-react-app
  2. npm install -g create-react-app
  3. npx clear-npx-cache
  4. npx create-react-app@latest my-react-app

...and u will be good to go. go ahead with command like cd my-react-app npm start

I had the same problem, uninstalling create-react-app and installing the latest version solved the problem:

npm uninstall -g create-react-app
npx clear-npx-cache
npm cache clean --force
npm install -g create-react-app@latest

then you can create your react app with

npx create-react-app your-app-name

npm uninstall -g create-react-app

npx clear-npx-cache

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}

我也遇到了这个问题,我通过清除缓存解决了我的问题!

npm cache clean --force

If anyone is still facing that problem after uninstalling it globally and cleaning the cache, try to run;

npm uninstall create-react-app

as you might have a non-global installation

Did you try with yarn? This works for me!

  1. yarn global remove create-react-app

  2. yarn create react-app my-app

Hope it works :)

This worked for me

npm uninstall -g create-react-app
npx create-react-app@latest

我可以通过从我的计算机上卸载 Nodejs 然后再次在我的计算机上下载最新的一个来解决我的问题。

适合我的解决方案:

  1. npm uninstall -g create-react-app
  2. yarn uninstall -g create-react-app
  3. npm i -g create-react-app

this worked for me.

npm uninstall -g create-react-app
npm uninstall create-react-app
npm cache clean --force
npm install create-react-app@latest

如果没有一个答案对您有用,请尝试在卸载 create-react-app 包后添加此命令。

npm i create-react-app

我用这个解决了它:

  1. npm uninstall -g create-react-app
  2. npm install create-react-app@latest

Actually I updated my script, I uninstalled react global and reinstalled but nothing changed. But yarn still works. I am still trying to solve problem but for a while, I will use

yarn create react-app my-app

Try this: npm uninstall -g create-react-app Then open: C:\Users\Your_user_name\AppData\Roaming\npm-cache delete everything in the folders. Open: C:\Users\Your_user_name\AppData\Roaming\npm delete everything related to create-react-app

Then finally: npx create-react-app my-project Worked for me. Good luck!

''' create-react-app projectName --template typescript '''

have you tried this

npm uninstall -g create-react-app

npx create-react-app@latest blog

For me,

npm uninstall -g create-react-app

and

npx create-react-app@latest opus

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM