Sunday, 26 May 2019

yarn 'There appears to be trouble with your network connection. Retrying...'

I'm working behind my institute proxy and can't use yarn, its showing

yarn install v1.16.0
info No lockfile found.
[1/4] Resolving packages...
info There appears to be trouble with your network connection. Retrying...

npm install giving me this error

network tunneling socket could not be established, statusCode=503

Yarn version 1.16.0; node version 8.10.0; npm version 3.5.2; ubuntu 18.04.02

What I have done so far:

  1. set proxy in /etc/apt/apt.conf and /etc/environment

    Acquire::http::proxy "http://username:password@proxy:port";
    Acquire::https::proxy "http://username:password@proxy:port";
    Acquire::ftp::proxy "http://username:password@proxy:port";

  2. set proxy in .bashrc

    export http_proxy="http://username:password@proxy:port";
    export https_proxy="http://username:password@proxy:port";
    export HTTPS_PROXY="http://username:password@proxy:port"
    export HTTP_PROXY="http://username:password@proxy:port"

  3. yarn install --network-timeout 100000

  4. yarn config set proxy http://username:password@host:port
    yarn config set https-proxy http://username:password@host:port

  5. with npm

    npm config set registry http://registry.npmjs.org/
    npm config set proxy http://username:mypassword@proxy:port
    npm config set https-proxy http://username:mypassword@proxy:port
    npm config set strict-ssl false
    npm --proxy http://myusername:mypassword@proxy.us.somecompany:8080 --without-ssl --insecure -g install

  6. Did all of these mentioned here https://github.com/yarnpkg/yarn/issues/5259#issuecomment-379769451
  7. Did all these Is there a way to make npm install (the command) to work behind proxy?

None of them fixed the problem. How do I make yarn work in this case?



from yarn 'There appears to be trouble with your network connection. Retrying...'

No comments:

Post a Comment