[英]How to solve error creating app in react js
I've installed react js in my pc.我已经在我的电脑中安装了 react js。 I tried to create a app in react in cmd by
create-react-app react-app
but it gave me following error:我试图通过
create-react-app react-app
在 cmd 中创建一个反应应用程序,但它给了我以下错误:
C:\Users\Ahnaaf Al Rafee>create-react-app react-app
Creating a new React app in C:\Users\Ahnaaf Al Rafee\react-app.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
npm ERR! Response timeout while trying to fetch https://registry.npmjs.org/@typescript-eslint%2fparser (over 30000ms)
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Ahnaaf Al Rafee\AppData\Roaming\npm-cache\_logs\2020-05-10T18_28_37_892Z-debug.log
Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-scripts has failed.
Deleting generated file... package.json
Deleting react-app / from C:\Users\Ahnaaf Al Rafee
Done.
It looks like your internet connection might be slow.看起来您的互联网连接可能很慢。 Try increasing the timeout in your
.npmrc
尝试增加
.npmrc
中的超时时间
Try this, it might help试试这个,它可能会有所帮助
npm cache clean --force
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.