繁体   English   中英

如何在创建 react-app 时修复导致问题的纱线

[英]How to fix yarn causing trouble while creating react-app

我想用create-react-app react-app创建一个反应应用程序,我收到以下错误

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...

yarn add v1.13.0
info No lockfile found.
[1/4] Resolving packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
warning react-scripts > jest-environment-jsdom-fourteen > jsdom > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/314
2
info There appears to be trouble with your network connection. Retrying...
warning react-scripts > jest > jest-cli > jest-config > jest-environment-jsdom > jsdom > request@2.88.2: request has been deprecated, see https://github.com/req
uest/request/issues/3142
warning react-scripts > resolve-url-loader > rework > css > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
warning react-scripts > resolve-url-loader > rework > css > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
warning react-scripts > jest > jest-cli > jest-config > jest-environment-jsdom > jsdom > left-pad@1.3.0: use String.prototype.padStart()
warning react-scripts > resolve-url-loader > rework > css > source-map-resolve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
warning react-scripts > workbox-webpack-plugin > workbox-build > strip-comments > babel-plugin-transform-object-rest-spread > babel-runtime > core-js@2.6.11: co
re-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3
.
[2/4] Fetching packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://registry.yarnpkg.com/@svgr/webpack/-/webpack-4.3.3.tgz: tunneling socket could not be established, cause=connect EC
ONNREFUSED 127.0.0.1:3128".


Aborting installation.

我在公司代理后面工作,但这是设置,我可以通过 npm 安装软件包,例如npm i -g create-react-appnpm i winston等。 我用谷歌搜索了这个问题并尝试了类似的方法:

yarn install --network-timeout 1000000

我配置了 npm 代理和纱线代理,但这也不起作用。 如果我尝试这样的事情: '纱线安装'导致'网络连接问题'我什至不能使用 npm 安装了。

这似乎只是您的互联网连接的问题。
如果您在 windows 上,请尝试删除临时文件并重新启动路由器。

如果这不能解决您的问题,请考虑重新启动您的机器。 也许它可能会有所帮助。

暂无
暂无

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

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