簡體   English   中英

如何解決在 React js 中創建應用程序時出錯

[英]How to solve error creating app in react js

我已經在我的電腦中安裝了 react js。 我試圖通過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.

看起來您的互聯網連接可能很慢。 嘗試增加.npmrc中的超時時間

試試這個,它可能會有所幫助

npm cache clean --force

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM