How to reset the npm registry in global npm config

NpmRegistryNpm Install

Npm Problem Overview


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

Appreciate your assistance.

Npm Solutions


Solution 1 - Npm

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

npm config set registry https://registry.npmjs.org/

or

npm config delete registry

NPM CONFIG DOCS

Solution 2 - Npm

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

Solution 3 - Npm

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!

Solution 4 - Npm

Yes...

You can use this

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionDinuka De SilvaView Question on Stackoverflow
Solution 1 - NpmKrakenView Answer on Stackoverflow
Solution 2 - NpmShekhar SahuView Answer on Stackoverflow
Solution 3 - NpmAditya PatnaikView Answer on Stackoverflow
Solution 4 - NpmDeepak swainView Answer on Stackoverflow