Yarn: Fails to install packages: ECONNRESET

Created on 11 Oct 2016  路  17Comments  路  Source: yarnpkg/yarn

Do you want to request a _feature_ or report a _bug_?
Report a bug.

What is the current behavior?
yarn install fails after step 2/4 (Fetching packages)

> yarn install
yarn install v0.15.1
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
error read ECONNRESET
    at exports._errnoException (util.js:1036:11)
    at TLSWrap.onread (net.js:564:26)
info Visit http://yarnpkg.com/en/docs/cli/install for documentation about this command.

I'm on a steady good wired connection. npm install works just fine.

If the current behavior is a bug, please provide the steps to reproduce.
Run yarn install in a project with package.json, where I normally would run npm install

What is the expected behavior?
Fetch packages into node_modules directory.

Please mention your node.js, yarn and operating system version.
Node 6.7.0, npm 3.10.8, yarn 0.15.11, Windows 10 Home.

Most helpful comment

I seem to have found a way to fix this issue by reinstalling yarn. I installed it via npm i -g yarnpkg and apparently something must have broken that at some point. Uninstalling via npm uninstall -g yarnpkg and then installing again via npm i -g yarn seems to have worked.

All 17 comments

This looks like a general network error rather than anything Windows-specific, so I'm going to edit the title of the issue to clarify that 馃槃

Does npm install work in the same project?

@Daniel15 Yes npm install works fine.

FYI >ping registry.npmjs.org -n 128:

Ping statistics for 151.101.60.162:
    Packets: Sent = 128, Received = 128, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 57ms, Maximum = 59ms, Average = 57ms

i meet the same problem in windows10

I have a similar issue on OS X 10.11. It worked fine in the beginning but after a few hours I started seeing the ECONNRESET error too. Right now I basically can't install anything using yarn. Clearing the yarn cache didn't help either.

I seem to have found a way to fix this issue by reinstalling yarn. I installed it via npm i -g yarnpkg and apparently something must have broken that at some point. Uninstalling via npm uninstall -g yarnpkg and then installing again via npm i -g yarn seems to have worked.

Reinstalling _yarn_ worked for me too.
npm uninstall -g yarn for uninstalling and
npm install -g yarn for installing.

Reinstalling yarn didn't work for me.

@gaui Are you sure is the same error?

@juangl Yes, exactly the same.

Suddenly it started working. I didn't do anything. I'm going to close this.

in mac os , it still doesn;t work

it also happened in my windows10

I got exactly the same error on Arch Linux.

@stephanedaviet I also get it on Archlinux, but reistall with npm almost works for me. It changes the kind of error.

Try setting an allowed outbound TCP rule on port 80/443 for Nodejs

Solved ? it also happened.

news:
I fixed it. update registry.

Was this page helpful?
0 / 5 - 0 ratings