【问题标题】:What is the difference 'create-react-app <project>' and 'yarn create-react-app <project>'?'create-react-app <project>' 和 'yarn create-react-app <project>' 有什么区别?
【发布时间】:2020-10-01 20:58:23
【问题描述】:

“create-react-app”和“yarn create-react-app name”有什么区别?

我不小心做了一个没有“yarn”或“npx”的项目。它奏效了。

我想知道为什么和差异。

【问题讨论】:

    标签: reactjs create-react-app yarnpkg npx


    【解决方案1】:

    create-react-app 可能已经作为全局包存在于您的系统中,因此它可以在没有 npxyarn 的情况下工作。

    如果您执行npx create-react-app name,则在获取最新的create-react-app 后创建react 应用程序。通常建议这样做。

    https://www.freecodecamp.org/news/npm-vs-npx-whats-the-difference/

    【讨论】:

      猜你喜欢
      • 2020-11-08
      • 2018-08-10
      • 2022-01-23
      • 1970-01-01
      • 2021-03-04
      • 1970-01-01
      • 2022-06-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多