After running yarn config set registry https://registry.yarnpkg.com/, Yarn continuously uses the wrong registry--in this case, https://registry.npmjs.org/.
Here is the output from yarn config list:
yarn config v1.13.0
info yarn config
{ 'version-tag-prefix': 'v',
'version-git-tag': true,
'version-commit-hooks': true,
'version-git-sign': false,
'version-git-message': 'v%s',
'init-version': '1.0.0',
'init-license': 'MIT',
'save-prefix': '^',
'bin-links': true,
'ignore-scripts': false,
'ignore-optional': false,
registry: 'https://registry.yarnpkg.com/',
'strict-ssl': true,
'user-agent': 'yarn/1.13.0 npm/? node/v8.11.4 linux x64',
lastUpdateCheck: 1552699471443 }
info npm config
{ 'strict-ssl': false,
ca: '',
registry: 'https://registry.yarnpkg.com/' }
As you can see from the output, I also ran npm config set registry ttps://registry.yarnpkg.com/ to avoid mix ups. I also checked the .npmrc and .yarnrc files for the any references to the npmjs registry.
***Edit: Also, deleted both the package-lock.json and the yarn.lock files before running yarn install. But still the npmjs registry is listed in the new yarn.lock file. It's not using the yarnpkg registry at all.
How can I force Yarn to use a specific registry?
By default, the Yarn CLI uses a different registry, and not the original one: https://registry.yarnpkg.com .
Yarn is basically a new installer, where NPM structure and registry is the same.
What is the default registry for Yarn? It's usually https://registry.npmjs.org/ , but it's configurable.
Remove yarn.lock, package-lock.json, all node_modules, .yarnrc and run: yarn cache clean && yarn install.
If that doesn't work, remove all again and run: yarn cache clean && yarn install --registry https://registry.yarnpkg.com/.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With