2025-08-02 20:55:21 +03:00
|
|
|
# npm config
|
2025-03-17 12:18:14 +01:00
|
|
|
|
|
|
|
> Manage the `npm` configuration settings.
|
2025-08-02 20:55:21 +03:00
|
|
|
> More information: <https://docs.npmjs.com/cli/npm-config>.
|
2025-03-17 12:18:14 +01:00
|
|
|
|
|
|
|
- Show all configuration settings:
|
|
|
|
|
2025-08-02 20:55:21 +03:00
|
|
|
`npm {{[c|config]}} list`
|
2025-03-17 12:18:14 +01:00
|
|
|
|
|
|
|
- List all configuration settings as `JSON`:
|
|
|
|
|
2025-08-02 20:55:21 +03:00
|
|
|
`npm {{[c|config]}} list --json`
|
2025-03-17 12:18:14 +01:00
|
|
|
|
|
|
|
- Get the value of a specific configuration key:
|
|
|
|
|
2025-08-02 20:55:21 +03:00
|
|
|
`npm {{[c|config]}} get {{key}}`
|
2025-03-17 12:18:14 +01:00
|
|
|
|
|
|
|
- Set a configuration key to a specific value:
|
|
|
|
|
2025-08-02 20:55:21 +03:00
|
|
|
`npm {{[c|config]}} set {{key}} {{value}}`
|
2025-03-17 12:18:14 +01:00
|
|
|
|
|
|
|
- Delete a configuration key:
|
|
|
|
|
2025-08-02 20:55:21 +03:00
|
|
|
`npm {{[c|config]}} delete {{key}}`
|
2025-03-17 12:18:14 +01:00
|
|
|
|
|
|
|
- Edit the global npm configuration file in the default editor:
|
|
|
|
|
2025-08-02 20:55:21 +03:00
|
|
|
`npm {{[c|config]}} edit`
|
2025-03-17 12:18:14 +01:00
|
|
|
|
|
|
|
- Attempt to repair invalid configuration items:
|
|
|
|
|
2025-08-02 20:55:21 +03:00
|
|
|
`npm {{[c|config]}} fix`
|