【发布时间】:2020-10-01 20:58:23
【问题描述】:
“create-react-app”和“yarn create-react-app name”有什么区别?
我不小心做了一个没有“yarn”或“npx”的项目。它奏效了。
我想知道为什么和差异。
【问题讨论】:
标签: reactjs create-react-app yarnpkg npx
“create-react-app”和“yarn create-react-app name”有什么区别?
我不小心做了一个没有“yarn”或“npx”的项目。它奏效了。
我想知道为什么和差异。
【问题讨论】:
标签: reactjs create-react-app yarnpkg npx
create-react-app 可能已经作为全局包存在于您的系统中,因此它可以在没有 npx 或 yarn 的情况下工作。
如果您执行npx create-react-app name,则在获取最新的create-react-app 后创建react 应用程序。通常建议这样做。
见https://www.freecodecamp.org/news/npm-vs-npx-whats-the-difference/
【讨论】: