create-react-app卸载与升级

 

用create-react-app 创建项目发现报错

复制代码
You are running `create-react-app` 4.0.3, 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/
复制代码

 

 

 

 

按照

npm uninstall -g create-react-app

提示卸载旧版本 ,查看版本号发现 并没有卸载成功

 

 

 此时 只能通过暴力删除法卸载了

1
2
3
➜  react-demos git:(master) ✗ which create-react-app
/usr/local/bin/create-react-app
➜  react-demos git:(master) ✗ rm -rf /usr/local/bin/create-react-app

  删除之后 通过查看版本号的方式 是否成功删除

➜  demo14_context git:(master) ✗ create-react-app -V                   
zsh: command not found: create-react-app

在安装最新版本create-react-app即可

npm install -g create-react-app

 

posted @   明媚下雨天  阅读(673)  评论(2编辑  收藏  举报
相关博文:
阅读排行:
· 百万级群聊的设计实践
· 永远不要相信用户的输入:从 SQL 注入攻防看输入验证的重要性
· 全网最简单!3分钟用满血DeepSeek R1开发一款AI智能客服,零代码轻松接入微信、公众号、小程
· .NET 10 首个预览版发布,跨平台开发与性能全面提升
· 《HelloGitHub》第 107 期
点击右上角即可分享
微信分享提示