How to reset the npm registry in global npm config

Is there any way to change or reset the global npm registry.

Appreciate your assistance.

1

4 Answers

Run the following command in your terminal to revert back to the default regsitry

npm config set registry 

or

npm config delete registry 

NPM CONFIG DOCS

2

If you are on windows, other than setting the registry, you can also delete the .npmrc file to reset the registry.

You can find this file at C:\Users\<Your User Name>\.npmrc

1

Sets a configuration key to a value

npm config set <key> <value> [-g|--global] 

Gets the value of an existing configuration key

npm config get <key> 

Deletes the key from all configuration files.

npm config delete <key> 

Lists all the config settings,could be used to check for existing config entries

npm config list 

Opens the config file in an editor.

npm config edit 

All that would help make changes to the npm registry

Source

Hope that helps!

Yes...

You can use this

$(npm config get globalconfig) npm config --global edit 

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like