“纱线安装”导致“网络连接问题”

时间:2017-03-28 05:11:28

标签: ruby-on-rails-4 yarnpkg react-on-rails

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".

首先我认为这可能是代理问题 所以我添加了我的公司代理设置:

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

但没有任何反应,仍然有上述错误。

2 个答案:

答案 0 :(得分:1)

我遇到了同样的问题,并通过以下步骤解决了该问题:

运行终端命令

  1. npm缓存清理--force
  2. 设置http_proxy =
  3. 设置https_proxy =
  4. 纱线配置删除代理
  5. Npm config rm https-proxy
  6. Npm配置rm代理
  7. 重启终端
  8. 纱线
  9. 纱线–网络超时100000
  10. 重新启动终端。

对我有用。

答案 1 :(得分:0)

尝试以下三个命令。它对我有用。

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