DEV Community

William Ghelfi
William Ghelfi

Posted on

How to make both npm and yarn use private registries

npm login --registry <YOUR_PRIVATE_REGISTRY_URL>
Enter fullscreen mode Exit fullscreen mode
yarn config delete registry
Enter fullscreen mode Exit fullscreen mode

then don't trust the autogenerated ~/.npmrc configuration and modify it like this:

always-auth=true
registry=<YOUR_PRIVATE_REGISTRY_URL>
_authToken=NpmToken.<YOUR_TOKEN>
Enter fullscreen mode Exit fullscreen mode

🍻 Cheers!

Top comments (0)