Useful yarn/npm commands to remember while working with custom registries

Default global registries:

Yarn: https://registry.yarnpkg.com

Npm: https://registry.npmjs.com/

Install dependencies from registry:

This is for a one-off case. The given registry will only be valid to run this command and won't set it for further commands.

yarn --registry=<registry url>

npm --registry=<registry url>

To check current registry:

Yarn: yarn config get registry

Npm: npm get registry

To change yarn global registry:

yarn config set registry <registry url>

To change npm global registry:

npm set registry <registry url>