简体   繁体   English

我正在尝试创建反应应用程序但失败了。 它显示错误

[英]I am trying to create react app but failed. It show error

Creating a new React app in G:\my-react-projects\dovana.在 G:\my-react-projects\dovana 中创建一个新的 React 应用程序。

Installing packages.安装软件包。 This might take a couple of minutes.这可能需要几分钟。 Installing react, react-dom, and react-scripts with cra-template...使用 cra-template 安装 react、react-dom 和 react-scripts...

npm ERR. npm 错误。 code ERR_SOCKET_TIMEOUT npm ERR.代码 ERR_SOCKET_TIMEOUT npm ERR。 network Socket timeout npm ERR, network This is a problem related to network connectivity. network Socket timeout npm ERR, network 这是与网络连接有关的问题。 npm ERR: network In most cases you are behind a proxy or have bad network settings. npm ERR:网络 在大多数情况下,您使用代理服务器或网络设置错误。 npm ERR! npm 错误! network npm ERR!网络 npm ERR! network If you are behind a proxy, please make sure that the npm ERR!网络 如果您在代理后面,请确保 npm ERR! network 'proxy' config is set properly.网络“代理”配置设置正确。 See: 'npm help config'请参阅:'npm 帮助配置'

npm ERR: A complete log of this run can be found in: npm ERR. npm ERR:此运行的完整日志可在以下位置找到:npm ERR。 C:\Users\M Monayem Hossain\AppData\Local\npm-cache_logs\2021-12-23T14_13_40_614Z-debug-0.log C:\Users\M Monayem Hossain\AppData\Local\npm-cache_logs\2021-12-23T14_13_40_614Z-debug-0.log

Aborting installation.中止安装。 npm install --no-audit --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed. npm install --no-audit --save --save-exact --loglevel 错误 react-dom react-scripts cra-template 失败。

Deleting generated file... package.json Deleting dovana/ from G:\my-react-projects Done.正在删除生成的文件... package.json 从 G:\my-react-projects 中删除 dovana/ 完成。

Try clearing cache and then rerun the setup again尝试清除缓存,然后重新运行设置

npm cache clean --force
npm install create-react-app
npx create-react-app my-app

try to install anything from NPM to confirm this is an issue with your connection.尝试从 NPM 安装任何东西,以确认这是您的连接问题。 npm install -g create-react-app. npm 安装 -g create-react-app。 If this (or any other package) succeeds, it may be other issue.如果此(或任何其他软件包)成功,则可能是其他问题。

Consider as well it could be an issue with npx on your machine.还要考虑这可能是您机器上的 npx 问题。 Try installing it using create-react-app directly instead by first installing it globally (like I showed above)尝试直接使用 create-react-app 安装它,而不是先全局安装它(就像我上面展示的那样)

Also try this也试试这个

npm config set registry http://registry.npmjs.org/ npm 配置集注册表http://registry.npmjs.org/

and this和这个

npm set timeout=100000 npm 设置超时=100000

can you set the npm timeout value to a longer time:您可以将 npm 超时值设置为更长的时间吗:

Step 1:步骤1:

Can you create a local file called.npmrc In the folder set the value for timeout to be:timeout=100000你可以在文件夹中创建一个名为.npmrc 的本地文件,将超时的值设置为:timeout=100000

or或者

Run the following:运行以下命令:

npm set timeout=100000

Step 2:第2步:

Finally run the following set of commands:最后运行以下命令集:

npm cache clean --force
npm install create-react-app
npx create-react-app ./

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误:MongoError:身份验证失败。 我正在使用 docker 和 mongoose - error: MongoError: Authentication failed. I am using docker and mongoose 我是 React 新手,之前我创建了 React 应用程序但没有尝试创建 React 应用程序但是花了很长时间后出现错误 - I am new to react, previously I created react apps but not trying to create a react app but after taking a long time it is giving an error 创建 React 应用程序失败。 我使用了 npm init react-app my-app - Creating React app failed. I used npm init react-app my-app 我正在尝试在 React 中创建一个盒子,但它不起作用 - I am trying to create a box in React, and it is not working 尝试创建React应用时出现错误 - I get an error when trying to create a React app 我正在尝试构建 react native 应用程序,但出现此错误:react native version mismatch expo - I am trying to build react native app and I get this error: react native version mismatch expo 我正在尝试使用“npx/npm create-react-app hello”命令创建一个反应应用程序并得到了整个消息 - I am trying to create a react app using the “npx/npm create-react-app hello” command and got this whole message 当我发送消息时,我正在尝试创建 web 聊天应用程序在控制台中出现此错误 - Am trying to create a web chat app when i send a message am having this error in console 我正在尝试使用 react-native 进行简单的路由,但我遇到了一些类似这样的错误 Failed building Javascript bundle - I am trying to do simple routing with react-native but I am getting some error like this Failed building Javascript bundle 我正在尝试创建 React 应用程序,但一直告诉我未经授权的访问 - I am trying to create react app but keeps on telling me unauthorized access
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM