C:\Users\lg\Desktop> npm uninstall -g create-react-app
up to date, audited 1 package in 216ms
found 0 vulnerabilities
Run Code Online (Sandbox Code Playgroud)
C:\Users\lg\Desktop>npx clear-npx-cache
Need to install the following packages:
clear-npx-cache
Ok to proceed? (y) y
Run Code Online (Sandbox Code Playgroud)
C:\Users\lg\Desktop>npx create-react-app@5.0.0 reduxapp
Need to install the following packages:
create-react-app@5.0.0
Ok to proceed? (y) y
npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
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/
Run Code Online (Sandbox Code Playgroud)
C:\Users\lg\Desktop>npm i tar
up to date, audited 153 packages in 1s
6 packages are looking for funding
run `npm fund` for details
3 high severity vulnerabilities
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
Run Code Online (Sandbox Code Playgroud)
C:\Users\lg\Desktop>npx create-react-app@5.0.0 reduxapp
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/
Run Code Online (Sandbox Code Playgroud)
我试图通过谷歌搜索解决它,但似乎出现错误,并且无法创建文件夹。
Sat*_*ddu 60
如果您最近在旧版本上运行过此操作,请尝试清除 npx-cache。
npx clear-npx-cache
npx install -g create-react-app react-app
Run Code Online (Sandbox Code Playgroud)
小智 10
因此,这些是我为使其正常工作而采取的步骤:
npm uninstall -g create-react-app
npx create-react-app@latest my-app-name
Run Code Online (Sandbox Code Playgroud)