DeX3
DeX3

Reputation: 5569

Yarn keeps using old registry

I've been using yarn with a private registry in the past - however, the registry has now shut down and I want to use yarn with the official registry.

Whatever I do, yarn always seems to want to connect to the old registry and there's simply no way of making it use the new one. I've already tried:

No matter what I do, yarn still tries to connect to the old registry on every install and I have no idea where yarn is getting that from...

any ideas?

Upvotes: 22

Views: 11108

Answers (4)

Zamaroht
Zamaroht

Reputation: 150

In my case, I got it fixed with a rm ~/.npmrc running MacOS

Upvotes: 1

M3RS
M3RS

Reputation: 7550

Running yarn add with --verbose will tell you which .yarnrc files are being picked up. These shouldn't include the old registry.

So run yarn add <your-package> --verbose and check the .yarnrc files found for any mention of the old registry.

Upvotes: 2

Anita
Anita

Reputation: 3166

Remove your global yarn.lock
rm ~/.config/yarn/global/yarn.lock
and then
yarn config set registry https://registry.yarnpkg.com/

Upvotes: 20

DeX3
DeX3

Reputation: 5569

Got it, the culprit was ~/.config/yarn/global/yarn.lock...

Upvotes: 9

Related Questions