LinuxCommandLibrary
GitHub F-Droid Google Play Store

npm-config

manages npm configuration

TLDR

List all config
$ npm config list
copy
Get config value
$ npm config get [registry]
copy
Set config value
$ npm config set [registry] [https://registry.npmjs.org/]
copy
Delete config
$ npm config delete [key]
copy
Edit config file
$ npm config edit
copy
List all with defaults
$ npm config list -l
copy
Set global config
$ npm config set [key] [value] -g
copy

SYNOPSIS

npm config [command] [options]

DESCRIPTION

npm config manages npm configuration across multiple levels. It reads settings from the command line, environment variables, and .npmrc files (project, user, and global).Configuration files are plain ini-formatted lists of key = value pairs. Environment variables prefixed with npm_config_ are also recognized as configuration settings.

PARAMETERS

set KEY=VALUE

Set a config value.
get KEY
Echo a config value to stdout.
list
Show all config settings. Use -l to show defaults. Use --json for JSON output.
delete KEY
Remove a key from all configuration files.
edit
Open the config file in an editor. Use --global to edit the global config.
fix
Repair invalid configuration entries.
-g, --global
Operate on the global configuration file.
--location user|global|project
Target a specific configuration level.

CAVEATS

Multiple .npmrc locations exist with a precedence order: project > user > global > defaults. Credentials and tokens may be stored in .npmrc files.

HISTORY

npm config is the configuration management system for npm behavior customization.

SEE ALSO

npm(1), npmrc(5)

Copied to clipboard
Kai

AltStyle によって変換されたページ (->オリジナル) /