【问题标题】:Error while installing react JS wiht the message: Unknown command: "create-react-app"安装带有消息的 React JS 时出错:未知命令:“create-react-app”
【发布时间】:2022-02-03 19:06:45
【问题描述】:

当我尝试使用我的 npm 安装 react JS 时遇到了这个问题。

这是按摩:

Unknown command: "create-react-app"
To see a list of supported npm commands, run:
  npm help

我该怎么办?

【问题讨论】:

  • 你试过npx create-react-app 吗?它会要求你安装create-react-app
  • 我试过了,但我刚刚得到了按摩

标签: reactjs react-native npm cmd npx


【解决方案1】:

使用npx create-react-app appname

反应文档 https://reactjs.org/docs/create-a-new-react-app.html

create-react-app 已过时,您必须使用旧文档或教程 祝你好运

【讨论】:

    【解决方案2】:

    当你创建 react 应用时使用 npx 而不是 npm。

    npx create-react-app my-app
    

    【讨论】:

      猜你喜欢
      • 2020-11-13
      • 2016-12-09
      • 1970-01-01
      • 1970-01-01
      • 2020-04-19
      • 2020-09-22
      • 2018-12-02
      • 2020-08-11
      • 1970-01-01
      相关资源
      最近更新 更多