问题
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.
- yarn config delete proxy
- npm config rm proxy
- npm config rm https-proxy
回答2:
I had the same issue and solved by following steps:
Run the terminal command
- npm cache clean --force
- set http_proxy=
- Set https_proxy=
- Yarn config delete proxy
- Npm config rm https-proxy
- Npm config rm proxy
- Restart your terminal
- yarn
- Yarn –network-timeout 100000
- Restart your terminal.
it worked for me.
来源:https://stackoverflow.com/questions/43061045/yarn-install-cause-trouble-with-network-connection