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
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 百万级群聊的设计实践
· 永远不要相信用户的输入:从 SQL 注入攻防看输入验证的重要性
· 全网最简单!3分钟用满血DeepSeek R1开发一款AI智能客服,零代码轻松接入微信、公众号、小程
· .NET 10 首个预览版发布,跨平台开发与性能全面提升
· 《HelloGitHub》第 107 期