【问题标题】:Please remove any global installs with one of the following commands:请使用以下命令之一删除任何全局安装:
【发布时间】:2022-01-21 10:57:25
【问题描述】:

PS E:\New 文件夹> npx create-react-app my-app 需要安装以下包: 创建反应应用 可以继续吗? (y) 是的

您正在运行create-react-app 4.0.3,它落后于最新版本 (5.0.0)。

我们不再支持全局安装 Create React App。

请使用以下命令之一删除所有全局安装:

  • npm 卸载 -g create-react-app
  • yarn 全局删除 create-react-app

可在此处找到有关创建新应用的最新说明: https://create-react-app.dev/docs/getting-started/[enter这里有图片说明]1

【问题讨论】:

  • 您的实际问题是什么?
  • 我无法创建反应应用程序
  • 我最近遇到了同样的问题。为了打破这个循环,我所做的是npm uninstall -g create-react-app,然后再次在全球范围内安装它(最新版本):npm install -g create-react-app。尽管它说了什么,但它在全局安装中运行良好。

标签: reactjs


【解决方案1】:
npx clear-npx-cache

然后

 npx create-react-app your-app

对我有用

来自:npx create-react-app prompting to globally uninstall non-existent create-react-app package?

【讨论】:

    猜你喜欢
    • 2022-06-27
    • 2023-04-03
    • 2016-06-21
    • 2016-06-09
    • 1970-01-01
    • 2013-08-08
    • 2019-12-12
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多