New*_*ner 70 package npm reactjs create-react-app npx
即使在完成卸载部分之后,我还是一次又一次地收到此 create React app 错误。
npm uninstall -g create-react-app
最新,在 570 毫秒内审核了 1 个包
发现0个漏洞
npx create-react-app test-app
需要安装以下软件包: create-react-app 确定继续吗?(y) y
您正在运行
create-react-app4.0.3,它落后于最新版本 (5.0.0)。我们不再支持 Create React App 的全局安装。
请使用以下命令之一删除所有全局安装:
- npm uninstall -g 创建-react-app
- 纱线全局删除create-react-app
创建新应用程序的最新说明可以在这里找到: https ://create-react-app.dev/docs/getting-started/
C:\>npm --version
8.3.0
C:\>node --version
v16.13.0
Run Code Online (Sandbox Code Playgroud)
我怎样才能解决这个问题?
May*_*iya 21
我已通过以下步骤解决:
npm uninstall -g create-react-app
npx clear-npx-cache
npx create-react-app myapp
Abo*_*zlR 12
只需尝试强制运行 create 命令到最新版本即可。像这样:
\nnpx create-react-app@latest_version my-app --use-npm\nRun Code Online (Sandbox Code Playgroud)\n最新版本是5.0.0所以试试吧以下命令:
\nnpx create-react-app@5.0.0 my-app\nRun Code Online (Sandbox Code Playgroud)\n现在,你的错误必须得到解决。
\n你只需要清除缓存,然后就可以创建一个新的 React 项目。首先,通过运行以下命令清除缓存:
\nnpx clear-npx-cache\nRun Code Online (Sandbox Code Playgroud)\n如果它不起作用,请使用此方法并重试:删除此路径中的所有内容。
\nC:\\Users\\Your_user_name\\AppData\\Roaming\\npm-cache\nRun Code Online (Sandbox Code Playgroud)\n在 macOS(可能还有 Linux)上,它\xe2\x80\x99s ~/.npm/_npx。您可以通过以下方式删除它:
\nrm -rf ~/.npm/_npx\nRun Code Online (Sandbox Code Playgroud)\n或者尝试一下命令npm cache clean --force或者在终端中使用管理员模式现在,只需重新运行您的创建命令即可。
npx create-react-app your-app\nRun Code Online (Sandbox Code Playgroud)\n只要一一运行这个命令就可以了。
\nnpm uninstall -g create-react-appnpm cache clean --forcenpm cache verifynpx create-react-app my-app| 归档时间: |
|
| 查看次数: |
35307 次 |
| 最近记录: |