'Yarn install' cause 'trouble with network connection'

点点圈 提交于 2020-06-14 04:10:47

问题


yarn install v0.21.3
[1/4] Resolving packages...
warning There appears to be trouble with your network connection. Retrying...
warning There appears to be trouble with your network connection. Retrying...
warning There appears to be trouble with your network connection. Retrying...
warning There appears to be trouble with your network connection. Retrying...
warning There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://github.com/igorklopov/node-resolve.git: tunneling socket could not be established, cause=write EPROTO 140399640340352:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:794:\n".

First i thought that this may be proxy issue So I've added my corporate proxy settings:

yarn config set proxy http://proxy.dvfu.ru:3128
yarn config set https-proxy https://proxy.dvfu.ru:3128

But nothing happened, still have the error above.


回答1:


Try below this three commands. Its worked for me.

  1. yarn config delete proxy
  2. npm config rm proxy
  3. npm config rm https-proxy



回答2:


I had the same issue and solved by following steps:

Run the terminal command

  1. npm cache clean --force
  2. set http_proxy=
  3. Set https_proxy=
  4. Yarn config delete proxy
  5. Npm config rm https-proxy
  6. Npm config rm proxy
  7. Restart your terminal
  8. yarn
  9. Yarn –network-timeout 100000
  10. Restart your terminal.

it worked for me.



来源:https://stackoverflow.com/questions/43061045/yarn-install-cause-trouble-with-network-connection

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!