Joe Gornick

yarn with private npm registries and authentication

We recently switched over a project from npm to yarn. Our existing project npm configuration (i.e. npmrc) specified private registries with authentication. I assumed that yarn would use existing npm configurations. However, after following this yarn issue thread, you must have a project yarnrc with the custom registries specified. Once the registries are defined, the existing npm configurations are used for authentication.

For example, the project folder already had the following .npmrc:



I then added the following .yarnrc to the project:

registry ""
"@foo:registry" ""


yarn does not honor authentication settings in .npmrc

comments powered by Disqus