Yarn: There appears to be trouble with your network connection. Retrying...

Created on 4 Mar 2018  路  14Comments  路  Source: yarnpkg/yarn

Operating System: Elementary OS Loki
Yarn version: 1.5.1
node version: 8.9.4

PROBLEM:
After update yarn to version 1.5.1, I can't install my project dependencies because yarn is not able to finish the installation process whereas if I use npm I don't have any problem.

The following message is always shown by yarn:

info There appears to be trouble with your network connection. Retrying...

I don't know why but the registry response time is increasing.

yarn install --verbose [...] verbose 9.127 Request "https://registry.yarnpkg.com/json-stringify-safe" finished with status code 200. verbose 9.128 Performing "GET" request to "https://registry.yarnpkg.com/yargs". verbose 9.128 Request "https://registry.yarnpkg.com/oauth-sign" finished with status code 200. verbose 9.129 Performing "GET" request to "https://registry.yarnpkg.com/@types%2fbody-parser". verbose 9.875 Request "https://registry.yarnpkg.com/stringstream" finished with status code 200. verbose 9.878 Performing "GET" request to "https://registry.yarnpkg.com/@types%2fserve-static". verbose 14.854 Request "https://registry.yarnpkg.com/performance-now" finished with status code 200. verbose 14.856 Performing "GET" request to "https://registry.yarnpkg.com/@types%2fexpress-serve-static-core". verbose 16.468 Request "https://registry.yarnpkg.com/tough-cookie" finished with status code 200. verbose 16.469 Performing "GET" request to "https://registry.yarnpkg.com/@types%2fnode". verbose 16.47 Request "https://registry.yarnpkg.com/tunnel-agent" finished with status code 200. verbose 16.471 Performing "GET" request to "https://registry.yarnpkg.com/ansi-regex". verbose 29.353 Request "https://registry.yarnpkg.com/uuid" finished with status code 200. verbose 29.354 Performing "GET" request to "https://registry.yarnpkg.com/core-util-is". verbose 29.359 Request "https://registry.yarnpkg.com/scss-tokenizer" finished with status code 200. verbose 29.36 Performing "GET" request to "https://registry.yarnpkg.com/isarray". verbose 51.424 Request "https://registry.yarnpkg.com/@types%2fbody-parser" finished with status code 200. verbose 51.425 Performing "GET" request to "https://registry.yarnpkg.com/process-nextick-args". verbose 51.426 Request "https://registry.yarnpkg.com/@types%2fserve-static" finished with status code 200. verbose 51.426 Performing "GET" request to "https://registry.yarnpkg.com/string_decoder". verbose 109.597 Request "https://registry.yarnpkg.com/ansi-regex" finished with status code 200. verbose 109.598 Performing "GET" request to "https://registry.yarnpkg.com/util-deprecate". verbose 109.599 Request "https://registry.yarnpkg.com/@types%2fexpress-serve-static-core" finished with status code 200. verbose 109.6 Performing "GET" request to "https://registry.yarnpkg.com/buffer-shims". info There appears to be trouble with your network connection. Retrying... verbose 130.299 Request "https://registry.yarnpkg.com/core-util-is" finished with status code 200. verbose 130.3 Performing "GET" request to "https://registry.yarnpkg.com/pseudomap". verbose 130.303 Performing "GET" request to "https://registry.yarnpkg.com/@types%2fnode". info There appears to be trouble with your network connection. Retrying... [...]

Any help with this?

triaged

Most helpful comment

Same probleme here....

All 14 comments

I've checked with windows 10 environment as well and it happens the same situation. I can't use yarn to install my project dependencies.

Same probleme here....

Same issue.

is it a common problem for windows 10 users? 'cause i'm facing this same issue for some time now

Just want to add that I'm seeing this issue as well with Windows 10.

I have same problem while installing electron

info There appears to be trouble with your network connection. Retrying...
verbose 132.762 Performing "GET" request to "https://registry.yarnpkg.com/@types%2fnode".
verbose 162.765 Error: Couldn't find package "@types/node@^8.0.24" required by "electron" on the "npm" registry.
    at MessageError.ExtendableBuiltin (/usr/local/Cellar/yarn/1.6.0/libexec/lib/cli.js:237:66)
    at new MessageError (/usr/local/Cellar/yarn/1.6.0/libexec/lib/cli.js:266:123)
    at PackageRequest.<anonymous> (/usr/local/Cellar/yarn/1.6.0/libexec/lib/cli.js:36410:17)
    at Generator.throw (<anonymous>)
    at step (/usr/local/Cellar/yarn/1.6.0/libexec/lib/cli.js:98:30)
    at /usr/local/Cellar/yarn/1.6.0/libexec/lib/cli.js:111:13
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:182:7)
error Couldn't find package "@types/node@^8.0.24" required by "electron" on the "npm" registry.

Try yarn config delete proxy - source

@wilfreddenton it didn't work for me.

I have the same issue

yarnpkg registry is running really slow right now, occasionally erroring out with haproxy_service_unavailable

Confirmed this is a npm outage https://status.npmjs.org/incidents/27bg84btqp7r

I don't think this issue is or was related to an npm outage...

This worked for me:

yarn install --pure-lockfile --proxy http://<proxy-address>:<port>

@anilshrish That worked for me, too. Thanks.

Was this page helpful?
0 / 5 - 0 ratings