简体   繁体   中英

How to solve error creating app in react js

I've installed react js in my pc. I tried to create a app in react in cmd by create-react-app react-app but it gave me following error:

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

Try this, it might help

npm cache clean --force

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM