npm Config, Auth & Cache/Set a config value

Write a configuration value.

Section: npm configuration

Set a config value

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

Write a configuration value.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing npm configuration
List config values
Display effective npm configuration.
OpenIn sheetbashsame section
List all config defaults
Display defaults and computed values.
OpenIn sheetbashsame section
Get a config value
Read a configuration value.
OpenIn sheetbashsame section
Delete a config value
Remove a config setting.
OpenIn sheetbashsame section
Edit npmrc
Open the user npmrc in an editor.
OpenIn sheetbashsame section
Verify cache
Validate the integrity of the npm cache.
OpenIn sheetbash1 tag match