![](/img/trans.png)
[英]Cannot create a new React application with create-react-app
[英]cannot create a new react project using create-react-app
我正在尝试使用 create-react-app 创建一个新的 React 项目,但每次都因为这个错误而失败......
我使用的是npm
版本6.3.0
和node
版本10.8.0
我不知道该怎么办............
在C:\\Users\\Demonblade\\Desktop\\test
创建一个新的 React 应用程序。
安装软件包。 这可能需要几分钟时间。 安装 react、react-dom 和 react-scripts...
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! <https://npm.community>
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Demonblade\AppData\Roaming\npm-cache\_logs\2018-08-09T15_27_48_357Z-debug.log
Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-scripts has failed.
Deleting generated file... node_modules
Deleting generated file... package.json
Deleting test / from C:\Users\Demonblade\Desktop
Done.
使用npx
(它与npm
5.2+)。
从反应文档:
您需要在您的机器上安装 Node >= 6 和 npm >= 5.2。 要创建项目,请运行:
npx create-react-app my-app
cd my-app
npm start
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.