'create-react-app'和'yarn create-react-app name'有什么区别?
我不小心制作了一个没有'yarn'或'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/