创建新的React应用程序时的错误(您正在运行`create-react-app`5.0.0,它是最新版本(5.0.1)的背后。
(我正在使用ubuntu。)
我收到的消息:
您正在运行create-react-app
5.0.0,它是最新版本(5.0.1)的背后。
我们不再支持创建React应用程序的全局安装。
请删除具有以下命令之一的任何全局安装:
- NPM卸载-G create-react-app
- yarn global global remove create-react-app应用
我已经尝试过: NPM卸载-G创建反应应用 NPX清洁NPX-CACHE npx create-react-app@最新项目名称
什么都没有可行
我现在该怎么办?
(I am using ubuntu.)
the message i am getting:
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/
I have already tried:
npm uninstall -g create-react-app
npx clean-npx-cache
npx create-react-app@latest project-name
Nothing works
what should i do now?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我知道这已经来晚了,但是...
我也遇到了同样的问题,我发现的每个解决方案似乎都没有起作用。最后,我发现了它。
我同时安装了纱线和NPM
两者都安装了Create-react-app,
如果您同时具有纱线和NPM npm
使用一个(或两个)
,然后运行以安装并创建应用程序
希望它对某人有帮助::)
I know it is late but...
I also had the same problem and every solution I found didn't seem to work. In the end I found it out.
I have both yarn and npm installed
create-react-app was installed in both and they were referencing each other
You need to perform both if you have both yarn and npm
Then clear cache using one (or both)
Then run to install and create the app
Hope it helps someone :)