簡體   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