'create-react-app '和'yarn create-react-app '?

问题描述 投票:0回答:1
有什么区别

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

我不小心制作了一个没有'yarn'或'npx'的项目。而且有效。

我想知道为什么和差异。

reactjs create-react-app yarn npx
1个回答
0
投票

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

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

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

© www.soinside.com 2019 - 2024. All rights reserved.