Last active
April 3, 2019 03:38
-
-
Save joshuaquek/c836874d87f900473e9692a91965b9bd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Summary: Use NPM with multiple registries, instead of just the default "https://registry.npmjs.org/" npm registry. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Step 2: Find the location of where .npmrc is located (if it doesnt exist): | |
npm config ls -l | |
touch .npmrc #===> ...or create this file if it doesn't already exist (NPM user config file) | |
#====> Inside that file, paste the following: | |
# -------- PASTE CONTENTS BELOW, EXCLUDING THIS LINE -------- | |
#...Default NPM registry | |
registry=https://registry.npmjs.org/ | |
#...Example on how to add custom public registries | |
@nodemodulesio:registry.node-modules.io/ | |
@custom-public-registry:your_public_registry_url.com/ | |
#...example on how to add a custom private registry | |
//npm.myCustomPrivateNPMregistry.io/:_password="SOME PASSWORD HERE" | |
//npm.myCustomPrivateNPMregistry.io/:username=my.username.here | |
//npm.myCustomPrivateNPMregistry.io/:[email protected] | |
//npm.myCustomPrivateNPMregistry.io/:always-auth=false | |
# set https download to false to quell UNABLE_TO_VERIFY_LEAF_SIGNATURE error | |
strict-ssl=false | |
# -------- PASTE CONTENTS ABOVE, EXCLUDING THIS LINE -------- | |
^D #====> # Save and exit the text editor |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment