Answers for "npm manage different registry"


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 # set the registrty of this profile.

# creating a work profile to use public registry.
npmrc -c work
npm config set registry

# 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