tao
tao

Reputation: 90227

error AggregateError [ECONNREFUSED] at internalConnectMultiple (node:net:1116:18) on yarn install in vue3 project

I'm trying to run yarn install in a Vue project and I receive this error:

yarn install v1.22.22
[1/4] Resolving packages...
[2/4] Fetching packages...
error AggregateError [ECONNREFUSED]:
    at internalConnectMultiple (node:net:1116:18)
    at afterConnectMultiple (node:net:1683:7)
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

I use nvm and tried installing the project deps using the following node versions: 20.12.2, 18.17.0 and 16.20.0. The error varies slightly (the one above is on node@20).

Running yarn in other projects in same work folder works as expected. There's nothing special about this project's folder. It's called client.

I've seen other questions about similar errors, but none when trying to install the dependencies of a project.

I've checked, there's nothing wrong with the internet connection.

I don't know what else to check.

Upvotes: 2

Views: 8146

Answers (1)

tao
tao

Reputation: 90227

I figured it out.

I cloned the project including a yarn.lock file which had links starting with http://localhost:4873/.
That was caused by a machine running a private registry on http://localhost:4873/, which would forward any request for packages it didn't host out to https://registry.yarnpkg.com.

The fix was to remove the yarn.lock file before running yarn install.

Upvotes: 3

Related Questions