【问题标题】:I am facing this problem while doing npx create-react-app can anyone help me?我在做 npx create-react-app 时遇到了这个问题,有人可以帮我吗?
【发布时间】:2022-01-20 08:06:50
【问题描述】:

您正在运行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/

【问题讨论】:

  • 显而易见的问题:您是否尝试过按照它所说的去做?有哪些结果?你可能之前在本地运行过npm install create-react-app
  • 尝试按照终端上的说明进行操作

标签: reactjs npm-install npx


【解决方案1】:

之后:

  1. npm uninstall -g create-react-app
  2. npm cache clean --force
  3. npm cache verify

试试这个:

  1. npx clear-npx-cache 清除你的 npx 缓存。
  2. npx create-react-app your-appnpx create-react-app@latest my-app --use-npm

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-11-08
    • 2023-03-28
    • 1970-01-01
    • 2023-03-19
    相关资源
    最近更新 更多