【问题标题】:I couldn't create react app , its throwing some error我无法创建反应应用程序,它引发了一些错误
【发布时间】:2022-01-21 22:30:05
【问题描述】:

我输入以下命令在我的系统中创建反应应用程序, npx create-react-app appname --template redux

我收到以下错误, 您正在运行 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 npm@latest -g

在使用 create-react-app 之前,请确保使用清理 npm 缓存 npm 缓存清理 --force

对于这个命令 (npm cache clean --force) ,出现以下错误

npm WARN 使用 --force 禁用推荐保护

请问有什么解决办法吗?

提前致谢。

【问题讨论】:

    标签: create-react-app


    【解决方案1】:

    使用以下命令解决问题。

    npm uninstall -g create-react-app
    

    npm install -g create-react-app
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-08-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-07-14
      相关资源
      最近更新 更多