Answers for "npm manage different registry"

0

npm manage different registry

# If you use your work npm registry and also want to use public registry. This is useful.
# npmrc is used to manage different npm registry profiles like work open-source etc.
npm -i npmrc -g # installs npmrc globally

# creating an open-source profile to use public registry.
npmrc -c open-source #create the profile open-source
npm config set registry https://registry.npmjs.org/ # set the registrty of this profile.

# creating a work profile to use public registry.
npmrc -c work
npm config set registry https://your-company-regsitry-link.org/

# To switch between profiles
npmrc open-source # switch to open-source profile.
npmrc work # swith to work profile.
Posted by: Guest on July-17-2021

Browse Popular Code Answers by Language