简体   繁体   中英

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

As the title says, I cannot run create-react-app.

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/

Doing this does not change the error. npm uninstall -g create-react-app

I entered this command to try it out and got a message that the tar was out of date. npm install -g create-react-app

npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm ERR! code EEXIST
npm ERR! path /opt/homebrew/bin/create-react-app
npm ERR! EEXIST: file already exists
npm ERR! File exists: /opt/homebrew/bin/create-react-app
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.

npm ERR! A complete log of this run can be found in:

https://www.npmjs.com/package/tar

I ran the command with this reference.

However, the tar was not updated. I have already tried all the published solutions, but they don't work. Can someone please help me? Please.

I tried clearing the cache but could not solve the problem. npx clear-npx-cache

Need to install the following packages:
  clear-npx-cache
Ok to proceed? (y) y

I was able to successfully run the following command by specifying the version each time, but it is a hassle and I want to be able to run it normally. npx create-react-app@latest my-app

The "fish" shell I am currently using is node v18.0.0, so I downgraded to v16.15.0 and it works fine.

fisher install jorgebucaran/nvm.fish

nvm install v16

I had forgotten to lower the node version in fish because it had been working fine with zsh.

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