简体   繁体   English

如何解决在 React js 中创建应用程序时出错

[英]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.

相关问题 如何解决创建反应应用程序的问题? - How do I solve problem creating react app? 如何解决无法读取 React js 中未定义错误的属性“地图”? - How to solve Cannot read property 'map' of undefined error in React js? 我该如何解决这个创建反应应用程序初始化错误 - How do I solve this create react app initialization error 如何解决 react.js 中的“未捕获错误:找不到模块“路径”错误 - How can I solve 'Uncaught Error: Cannot find module 'path'' error in react.js 如何用 setInterval 解决 React.js 问题? - how to solve React.js problem with setInterval? 我的反应应用程序中的消息如何解决这个问题 - message in my react app how to solve this 如何解决在react中查看App的render方法 - How to solve Check the render method of App in react 创建反应应用程序时出现此错误:找不到模块'./lib/pack.js' - When creating react app this error appears: Cannot find module './lib/pack.js' 我该如何解决 React App 中的这个错误? (“组件”未定义 no-undef) - How can I solve this error in React App? ('Component' is not defined no-undef) 我该如何解决这个错误? “在'./App'中找不到导出'默认'(导入为'App')(可能的导出:App)”(我使用反应) - How can I solve this error? "export 'default' (imported as 'App') was not found in './App' (possible exports: App)" (im using react)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM