11cb0ef41Sopenharmony_ci---
21cb0ef41Sopenharmony_cititle: config
31cb0ef41Sopenharmony_cisection: 7
41cb0ef41Sopenharmony_cidescription: More than you probably want to know about npm configuration
51cb0ef41Sopenharmony_ci---
61cb0ef41Sopenharmony_ci
71cb0ef41Sopenharmony_ci### Description
81cb0ef41Sopenharmony_ci
91cb0ef41Sopenharmony_ciThis article details npm configuration in general. To learn about the `config` command,
101cb0ef41Sopenharmony_cisee [`npm config`](/commands/npm-config).
111cb0ef41Sopenharmony_ci
121cb0ef41Sopenharmony_cinpm gets its configuration values from the following sources, sorted by priority:
131cb0ef41Sopenharmony_ci
141cb0ef41Sopenharmony_ci#### Command Line Flags
151cb0ef41Sopenharmony_ci
161cb0ef41Sopenharmony_ciPutting `--foo bar` on the command line sets the `foo` configuration
171cb0ef41Sopenharmony_ciparameter to `"bar"`.  A `--` argument tells the cli parser to stop
181cb0ef41Sopenharmony_cireading flags.  Using `--flag` without specifying any value will set
191cb0ef41Sopenharmony_cithe value to `true`.
201cb0ef41Sopenharmony_ci
211cb0ef41Sopenharmony_ciExample: `--flag1 --flag2` will set both configuration parameters
221cb0ef41Sopenharmony_cito `true`, while `--flag1 --flag2 bar` will set `flag1` to `true`,
231cb0ef41Sopenharmony_ciand `flag2` to `bar`.  Finally, `--flag1 --flag2 -- bar` will set
241cb0ef41Sopenharmony_ciboth configuration parameters to `true`, and the `bar` is taken
251cb0ef41Sopenharmony_cias a command argument.
261cb0ef41Sopenharmony_ci
271cb0ef41Sopenharmony_ci#### Environment Variables
281cb0ef41Sopenharmony_ci
291cb0ef41Sopenharmony_ciAny environment variables that start with `npm_config_` will be
301cb0ef41Sopenharmony_ciinterpreted as a configuration parameter.  For example, putting
311cb0ef41Sopenharmony_ci`npm_config_foo=bar` in your environment will set the `foo`
321cb0ef41Sopenharmony_ciconfiguration parameter to `bar`.  Any environment configurations that
331cb0ef41Sopenharmony_ciare not given a value will be given the value of `true`.  Config
341cb0ef41Sopenharmony_civalues are case-insensitive, so `NPM_CONFIG_FOO=bar` will work the
351cb0ef41Sopenharmony_cisame. However, please note that inside [`scripts`](/using-npm/scripts)
361cb0ef41Sopenharmony_cinpm will set its own environment variables and Node will prefer
371cb0ef41Sopenharmony_cithose lowercase versions over any uppercase ones that you might set.
381cb0ef41Sopenharmony_ciFor details see [this issue](https://github.com/npm/npm/issues/14528).
391cb0ef41Sopenharmony_ci
401cb0ef41Sopenharmony_ciNotice that you need to use underscores instead of dashes, so `--allow-same-version`
411cb0ef41Sopenharmony_ciwould become `npm_config_allow_same_version=true`.
421cb0ef41Sopenharmony_ci
431cb0ef41Sopenharmony_ci#### npmrc Files
441cb0ef41Sopenharmony_ci
451cb0ef41Sopenharmony_ciThe four relevant files are:
461cb0ef41Sopenharmony_ci
471cb0ef41Sopenharmony_ci* per-project configuration file (`/path/to/my/project/.npmrc`)
481cb0ef41Sopenharmony_ci* per-user configuration file (defaults to `$HOME/.npmrc`; configurable via CLI
491cb0ef41Sopenharmony_ci  option `--userconfig` or environment variable `$NPM_CONFIG_USERCONFIG`)
501cb0ef41Sopenharmony_ci* global configuration file (defaults to `$PREFIX/etc/npmrc`; configurable via
511cb0ef41Sopenharmony_ci  CLI option `--globalconfig` or environment variable `$NPM_CONFIG_GLOBALCONFIG`)
521cb0ef41Sopenharmony_ci* npm's built-in configuration file (`/path/to/npm/npmrc`)
531cb0ef41Sopenharmony_ci
541cb0ef41Sopenharmony_ciSee [npmrc](/configuring-npm/npmrc) for more details.
551cb0ef41Sopenharmony_ci
561cb0ef41Sopenharmony_ci#### Default Configs
571cb0ef41Sopenharmony_ci
581cb0ef41Sopenharmony_ciRun `npm config ls -l` to see a set of configuration parameters that are
591cb0ef41Sopenharmony_ciinternal to npm, and are defaults if nothing else is specified.
601cb0ef41Sopenharmony_ci
611cb0ef41Sopenharmony_ci### Shorthands and Other CLI Niceties
621cb0ef41Sopenharmony_ci
631cb0ef41Sopenharmony_ciThe following shorthands are parsed on the command-line:
641cb0ef41Sopenharmony_ci
651cb0ef41Sopenharmony_ci* `-a`: `--all`
661cb0ef41Sopenharmony_ci* `--enjoy-by`: `--before`
671cb0ef41Sopenharmony_ci* `-c`: `--call`
681cb0ef41Sopenharmony_ci* `--desc`: `--description`
691cb0ef41Sopenharmony_ci* `-f`: `--force`
701cb0ef41Sopenharmony_ci* `-g`: `--global`
711cb0ef41Sopenharmony_ci* `--iwr`: `--include-workspace-root`
721cb0ef41Sopenharmony_ci* `-L`: `--location`
731cb0ef41Sopenharmony_ci* `-d`: `--loglevel info`
741cb0ef41Sopenharmony_ci* `-s`: `--loglevel silent`
751cb0ef41Sopenharmony_ci* `--silent`: `--loglevel silent`
761cb0ef41Sopenharmony_ci* `--ddd`: `--loglevel silly`
771cb0ef41Sopenharmony_ci* `--dd`: `--loglevel verbose`
781cb0ef41Sopenharmony_ci* `--verbose`: `--loglevel verbose`
791cb0ef41Sopenharmony_ci* `-q`: `--loglevel warn`
801cb0ef41Sopenharmony_ci* `--quiet`: `--loglevel warn`
811cb0ef41Sopenharmony_ci* `-l`: `--long`
821cb0ef41Sopenharmony_ci* `-m`: `--message`
831cb0ef41Sopenharmony_ci* `--local`: `--no-global`
841cb0ef41Sopenharmony_ci* `-n`: `--no-yes`
851cb0ef41Sopenharmony_ci* `--no`: `--no-yes`
861cb0ef41Sopenharmony_ci* `-p`: `--parseable`
871cb0ef41Sopenharmony_ci* `--porcelain`: `--parseable`
881cb0ef41Sopenharmony_ci* `-C`: `--prefix`
891cb0ef41Sopenharmony_ci* `--readonly`: `--read-only`
901cb0ef41Sopenharmony_ci* `--reg`: `--registry`
911cb0ef41Sopenharmony_ci* `-S`: `--save`
921cb0ef41Sopenharmony_ci* `-B`: `--save-bundle`
931cb0ef41Sopenharmony_ci* `-D`: `--save-dev`
941cb0ef41Sopenharmony_ci* `-E`: `--save-exact`
951cb0ef41Sopenharmony_ci* `-O`: `--save-optional`
961cb0ef41Sopenharmony_ci* `-P`: `--save-prod`
971cb0ef41Sopenharmony_ci* `-?`: `--usage`
981cb0ef41Sopenharmony_ci* `-h`: `--usage`
991cb0ef41Sopenharmony_ci* `-H`: `--usage`
1001cb0ef41Sopenharmony_ci* `--help`: `--usage`
1011cb0ef41Sopenharmony_ci* `-v`: `--version`
1021cb0ef41Sopenharmony_ci* `-w`: `--workspace`
1031cb0ef41Sopenharmony_ci* `--ws`: `--workspaces`
1041cb0ef41Sopenharmony_ci* `-y`: `--yes`
1051cb0ef41Sopenharmony_ci
1061cb0ef41Sopenharmony_ciIf the specified configuration param resolves unambiguously to a known
1071cb0ef41Sopenharmony_ciconfiguration parameter, then it is expanded to that configuration
1081cb0ef41Sopenharmony_ciparameter.  For example:
1091cb0ef41Sopenharmony_ci
1101cb0ef41Sopenharmony_ci```bash
1111cb0ef41Sopenharmony_cinpm ls --par
1121cb0ef41Sopenharmony_ci# same as:
1131cb0ef41Sopenharmony_cinpm ls --parseable
1141cb0ef41Sopenharmony_ci```
1151cb0ef41Sopenharmony_ci
1161cb0ef41Sopenharmony_ciIf multiple single-character shorthands are strung together, and the
1171cb0ef41Sopenharmony_ciresulting combination is unambiguously not some other configuration
1181cb0ef41Sopenharmony_ciparam, then it is expanded to its various component pieces.  For
1191cb0ef41Sopenharmony_ciexample:
1201cb0ef41Sopenharmony_ci
1211cb0ef41Sopenharmony_ci```bash
1221cb0ef41Sopenharmony_cinpm ls -gpld
1231cb0ef41Sopenharmony_ci# same as:
1241cb0ef41Sopenharmony_cinpm ls --global --parseable --long --loglevel info
1251cb0ef41Sopenharmony_ci```
1261cb0ef41Sopenharmony_ci
1271cb0ef41Sopenharmony_ci### Config Settings
1281cb0ef41Sopenharmony_ci
1291cb0ef41Sopenharmony_ci#### `_auth`
1301cb0ef41Sopenharmony_ci
1311cb0ef41Sopenharmony_ci* Default: null
1321cb0ef41Sopenharmony_ci* Type: null or String
1331cb0ef41Sopenharmony_ci
1341cb0ef41Sopenharmony_ciA basic-auth string to use when authenticating against the npm registry.
1351cb0ef41Sopenharmony_ciThis will ONLY be used to authenticate against the npm registry. For other
1361cb0ef41Sopenharmony_ciregistries you will need to scope it like "//other-registry.tld/:_auth"
1371cb0ef41Sopenharmony_ci
1381cb0ef41Sopenharmony_ciWarning: This should generally not be set via a command-line option. It is
1391cb0ef41Sopenharmony_cisafer to use a registry-provided authentication bearer token stored in the
1401cb0ef41Sopenharmony_ci~/.npmrc file by running `npm login`.
1411cb0ef41Sopenharmony_ci
1421cb0ef41Sopenharmony_ci
1431cb0ef41Sopenharmony_ci
1441cb0ef41Sopenharmony_ci#### `access`
1451cb0ef41Sopenharmony_ci
1461cb0ef41Sopenharmony_ci* Default: 'public' for new packages, existing packages it will not change the
1471cb0ef41Sopenharmony_ci  current level
1481cb0ef41Sopenharmony_ci* Type: null, "restricted", or "public"
1491cb0ef41Sopenharmony_ci
1501cb0ef41Sopenharmony_ciIf you do not want your scoped package to be publicly viewable (and
1511cb0ef41Sopenharmony_ciinstallable) set `--access=restricted`.
1521cb0ef41Sopenharmony_ci
1531cb0ef41Sopenharmony_ciUnscoped packages can not be set to `restricted`.
1541cb0ef41Sopenharmony_ci
1551cb0ef41Sopenharmony_ciNote: This defaults to not changing the current access level for existing
1561cb0ef41Sopenharmony_cipackages. Specifying a value of `restricted` or `public` during publish will
1571cb0ef41Sopenharmony_cichange the access for an existing package the same way that `npm access set
1581cb0ef41Sopenharmony_cistatus` would.
1591cb0ef41Sopenharmony_ci
1601cb0ef41Sopenharmony_ci
1611cb0ef41Sopenharmony_ci
1621cb0ef41Sopenharmony_ci#### `all`
1631cb0ef41Sopenharmony_ci
1641cb0ef41Sopenharmony_ci* Default: false
1651cb0ef41Sopenharmony_ci* Type: Boolean
1661cb0ef41Sopenharmony_ci
1671cb0ef41Sopenharmony_ciWhen running `npm outdated` and `npm ls`, setting `--all` will show all
1681cb0ef41Sopenharmony_cioutdated or installed packages, rather than only those directly depended
1691cb0ef41Sopenharmony_ciupon by the current project.
1701cb0ef41Sopenharmony_ci
1711cb0ef41Sopenharmony_ci
1721cb0ef41Sopenharmony_ci
1731cb0ef41Sopenharmony_ci#### `allow-same-version`
1741cb0ef41Sopenharmony_ci
1751cb0ef41Sopenharmony_ci* Default: false
1761cb0ef41Sopenharmony_ci* Type: Boolean
1771cb0ef41Sopenharmony_ci
1781cb0ef41Sopenharmony_ciPrevents throwing an error when `npm version` is used to set the new version
1791cb0ef41Sopenharmony_cito the same value as the current version.
1801cb0ef41Sopenharmony_ci
1811cb0ef41Sopenharmony_ci
1821cb0ef41Sopenharmony_ci
1831cb0ef41Sopenharmony_ci#### `audit`
1841cb0ef41Sopenharmony_ci
1851cb0ef41Sopenharmony_ci* Default: true
1861cb0ef41Sopenharmony_ci* Type: Boolean
1871cb0ef41Sopenharmony_ci
1881cb0ef41Sopenharmony_ciWhen "true" submit audit reports alongside the current npm command to the
1891cb0ef41Sopenharmony_cidefault registry and all registries configured for scopes. See the
1901cb0ef41Sopenharmony_cidocumentation for [`npm audit`](/commands/npm-audit) for details on what is
1911cb0ef41Sopenharmony_cisubmitted.
1921cb0ef41Sopenharmony_ci
1931cb0ef41Sopenharmony_ci
1941cb0ef41Sopenharmony_ci
1951cb0ef41Sopenharmony_ci#### `audit-level`
1961cb0ef41Sopenharmony_ci
1971cb0ef41Sopenharmony_ci* Default: null
1981cb0ef41Sopenharmony_ci* Type: null, "info", "low", "moderate", "high", "critical", or "none"
1991cb0ef41Sopenharmony_ci
2001cb0ef41Sopenharmony_ciThe minimum level of vulnerability for `npm audit` to exit with a non-zero
2011cb0ef41Sopenharmony_ciexit code.
2021cb0ef41Sopenharmony_ci
2031cb0ef41Sopenharmony_ci
2041cb0ef41Sopenharmony_ci
2051cb0ef41Sopenharmony_ci#### `auth-type`
2061cb0ef41Sopenharmony_ci
2071cb0ef41Sopenharmony_ci* Default: "web"
2081cb0ef41Sopenharmony_ci* Type: "legacy" or "web"
2091cb0ef41Sopenharmony_ci
2101cb0ef41Sopenharmony_ciWhat authentication strategy to use with `login`. Note that if an `otp`
2111cb0ef41Sopenharmony_ciconfig is given, this value will always be set to `legacy`.
2121cb0ef41Sopenharmony_ci
2131cb0ef41Sopenharmony_ci
2141cb0ef41Sopenharmony_ci
2151cb0ef41Sopenharmony_ci#### `before`
2161cb0ef41Sopenharmony_ci
2171cb0ef41Sopenharmony_ci* Default: null
2181cb0ef41Sopenharmony_ci* Type: null or Date
2191cb0ef41Sopenharmony_ci
2201cb0ef41Sopenharmony_ciIf passed to `npm install`, will rebuild the npm tree such that only
2211cb0ef41Sopenharmony_civersions that were available **on or before** the `--before` time get
2221cb0ef41Sopenharmony_ciinstalled. If there's no versions available for the current set of direct
2231cb0ef41Sopenharmony_cidependencies, the command will error.
2241cb0ef41Sopenharmony_ci
2251cb0ef41Sopenharmony_ciIf the requested version is a `dist-tag` and the given tag does not pass the
2261cb0ef41Sopenharmony_ci`--before` filter, the most recent version less than or equal to that tag
2271cb0ef41Sopenharmony_ciwill be used. For example, `foo@latest` might install `foo@1.2` even though
2281cb0ef41Sopenharmony_ci`latest` is `2.0`.
2291cb0ef41Sopenharmony_ci
2301cb0ef41Sopenharmony_ci
2311cb0ef41Sopenharmony_ci
2321cb0ef41Sopenharmony_ci#### `bin-links`
2331cb0ef41Sopenharmony_ci
2341cb0ef41Sopenharmony_ci* Default: true
2351cb0ef41Sopenharmony_ci* Type: Boolean
2361cb0ef41Sopenharmony_ci
2371cb0ef41Sopenharmony_ciTells npm to create symlinks (or `.cmd` shims on Windows) for package
2381cb0ef41Sopenharmony_ciexecutables.
2391cb0ef41Sopenharmony_ci
2401cb0ef41Sopenharmony_ciSet to false to have it not do this. This can be used to work around the
2411cb0ef41Sopenharmony_cifact that some file systems don't support symlinks, even on ostensibly Unix
2421cb0ef41Sopenharmony_cisystems.
2431cb0ef41Sopenharmony_ci
2441cb0ef41Sopenharmony_ci
2451cb0ef41Sopenharmony_ci
2461cb0ef41Sopenharmony_ci#### `browser`
2471cb0ef41Sopenharmony_ci
2481cb0ef41Sopenharmony_ci* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"`
2491cb0ef41Sopenharmony_ci* Type: null, Boolean, or String
2501cb0ef41Sopenharmony_ci
2511cb0ef41Sopenharmony_ciThe browser that is called by npm commands to open websites.
2521cb0ef41Sopenharmony_ci
2531cb0ef41Sopenharmony_ciSet to `false` to suppress browser behavior and instead print urls to
2541cb0ef41Sopenharmony_citerminal.
2551cb0ef41Sopenharmony_ci
2561cb0ef41Sopenharmony_ciSet to `true` to use default system URL opener.
2571cb0ef41Sopenharmony_ci
2581cb0ef41Sopenharmony_ci
2591cb0ef41Sopenharmony_ci
2601cb0ef41Sopenharmony_ci#### `ca`
2611cb0ef41Sopenharmony_ci
2621cb0ef41Sopenharmony_ci* Default: null
2631cb0ef41Sopenharmony_ci* Type: null or String (can be set multiple times)
2641cb0ef41Sopenharmony_ci
2651cb0ef41Sopenharmony_ciThe Certificate Authority signing certificate that is trusted for SSL
2661cb0ef41Sopenharmony_ciconnections to the registry. Values should be in PEM format (Windows calls
2671cb0ef41Sopenharmony_ciit "Base-64 encoded X.509 (.CER)") with newlines replaced by the string
2681cb0ef41Sopenharmony_ci"\n". For example:
2691cb0ef41Sopenharmony_ci
2701cb0ef41Sopenharmony_ci```ini
2711cb0ef41Sopenharmony_cica="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----"
2721cb0ef41Sopenharmony_ci```
2731cb0ef41Sopenharmony_ci
2741cb0ef41Sopenharmony_ciSet to `null` to only allow "known" registrars, or to a specific CA cert to
2751cb0ef41Sopenharmony_citrust only that specific signing authority.
2761cb0ef41Sopenharmony_ci
2771cb0ef41Sopenharmony_ciMultiple CAs can be trusted by specifying an array of certificates:
2781cb0ef41Sopenharmony_ci
2791cb0ef41Sopenharmony_ci```ini
2801cb0ef41Sopenharmony_cica[]="..."
2811cb0ef41Sopenharmony_cica[]="..."
2821cb0ef41Sopenharmony_ci```
2831cb0ef41Sopenharmony_ci
2841cb0ef41Sopenharmony_ciSee also the `strict-ssl` config.
2851cb0ef41Sopenharmony_ci
2861cb0ef41Sopenharmony_ci
2871cb0ef41Sopenharmony_ci
2881cb0ef41Sopenharmony_ci#### `cache`
2891cb0ef41Sopenharmony_ci
2901cb0ef41Sopenharmony_ci* Default: Windows: `%LocalAppData%\npm-cache`, Posix: `~/.npm`
2911cb0ef41Sopenharmony_ci* Type: Path
2921cb0ef41Sopenharmony_ci
2931cb0ef41Sopenharmony_ciThe location of npm's cache directory.
2941cb0ef41Sopenharmony_ci
2951cb0ef41Sopenharmony_ci
2961cb0ef41Sopenharmony_ci
2971cb0ef41Sopenharmony_ci#### `cafile`
2981cb0ef41Sopenharmony_ci
2991cb0ef41Sopenharmony_ci* Default: null
3001cb0ef41Sopenharmony_ci* Type: Path
3011cb0ef41Sopenharmony_ci
3021cb0ef41Sopenharmony_ciA path to a file containing one or multiple Certificate Authority signing
3031cb0ef41Sopenharmony_cicertificates. Similar to the `ca` setting, but allows for multiple CA's, as
3041cb0ef41Sopenharmony_ciwell as for the CA information to be stored in a file on disk.
3051cb0ef41Sopenharmony_ci
3061cb0ef41Sopenharmony_ci
3071cb0ef41Sopenharmony_ci
3081cb0ef41Sopenharmony_ci#### `call`
3091cb0ef41Sopenharmony_ci
3101cb0ef41Sopenharmony_ci* Default: ""
3111cb0ef41Sopenharmony_ci* Type: String
3121cb0ef41Sopenharmony_ci
3131cb0ef41Sopenharmony_ciOptional companion option for `npm exec`, `npx` that allows for specifying a
3141cb0ef41Sopenharmony_cicustom command to be run along with the installed packages.
3151cb0ef41Sopenharmony_ci
3161cb0ef41Sopenharmony_ci```bash
3171cb0ef41Sopenharmony_cinpm exec --package yo --package generator-node --call "yo node"
3181cb0ef41Sopenharmony_ci```
3191cb0ef41Sopenharmony_ci
3201cb0ef41Sopenharmony_ci
3211cb0ef41Sopenharmony_ci
3221cb0ef41Sopenharmony_ci#### `cidr`
3231cb0ef41Sopenharmony_ci
3241cb0ef41Sopenharmony_ci* Default: null
3251cb0ef41Sopenharmony_ci* Type: null or String (can be set multiple times)
3261cb0ef41Sopenharmony_ci
3271cb0ef41Sopenharmony_ciThis is a list of CIDR address to be used when configuring limited access
3281cb0ef41Sopenharmony_citokens with the `npm token create` command.
3291cb0ef41Sopenharmony_ci
3301cb0ef41Sopenharmony_ci
3311cb0ef41Sopenharmony_ci
3321cb0ef41Sopenharmony_ci#### `color`
3331cb0ef41Sopenharmony_ci
3341cb0ef41Sopenharmony_ci* Default: true unless the NO_COLOR environ is set to something other than '0'
3351cb0ef41Sopenharmony_ci* Type: "always" or Boolean
3361cb0ef41Sopenharmony_ci
3371cb0ef41Sopenharmony_ciIf false, never shows colors. If `"always"` then always shows colors. If
3381cb0ef41Sopenharmony_citrue, then only prints color codes for tty file descriptors.
3391cb0ef41Sopenharmony_ci
3401cb0ef41Sopenharmony_ci
3411cb0ef41Sopenharmony_ci
3421cb0ef41Sopenharmony_ci#### `commit-hooks`
3431cb0ef41Sopenharmony_ci
3441cb0ef41Sopenharmony_ci* Default: true
3451cb0ef41Sopenharmony_ci* Type: Boolean
3461cb0ef41Sopenharmony_ci
3471cb0ef41Sopenharmony_ciRun git commit hooks when using the `npm version` command.
3481cb0ef41Sopenharmony_ci
3491cb0ef41Sopenharmony_ci
3501cb0ef41Sopenharmony_ci
3511cb0ef41Sopenharmony_ci#### `cpu`
3521cb0ef41Sopenharmony_ci
3531cb0ef41Sopenharmony_ci* Default: null
3541cb0ef41Sopenharmony_ci* Type: null or String
3551cb0ef41Sopenharmony_ci
3561cb0ef41Sopenharmony_ciOverride CPU architecture of native modules to install. Acceptable values
3571cb0ef41Sopenharmony_ciare same as `cpu` field of package.json, which comes from `process.arch`.
3581cb0ef41Sopenharmony_ci
3591cb0ef41Sopenharmony_ci
3601cb0ef41Sopenharmony_ci
3611cb0ef41Sopenharmony_ci#### `depth`
3621cb0ef41Sopenharmony_ci
3631cb0ef41Sopenharmony_ci* Default: `Infinity` if `--all` is set, otherwise `1`
3641cb0ef41Sopenharmony_ci* Type: null or Number
3651cb0ef41Sopenharmony_ci
3661cb0ef41Sopenharmony_ciThe depth to go when recursing packages for `npm ls`.
3671cb0ef41Sopenharmony_ci
3681cb0ef41Sopenharmony_ciIf not set, `npm ls` will show only the immediate dependencies of the root
3691cb0ef41Sopenharmony_ciproject. If `--all` is set, then npm will show all dependencies by default.
3701cb0ef41Sopenharmony_ci
3711cb0ef41Sopenharmony_ci
3721cb0ef41Sopenharmony_ci
3731cb0ef41Sopenharmony_ci#### `description`
3741cb0ef41Sopenharmony_ci
3751cb0ef41Sopenharmony_ci* Default: true
3761cb0ef41Sopenharmony_ci* Type: Boolean
3771cb0ef41Sopenharmony_ci
3781cb0ef41Sopenharmony_ciShow the description in `npm search`
3791cb0ef41Sopenharmony_ci
3801cb0ef41Sopenharmony_ci
3811cb0ef41Sopenharmony_ci
3821cb0ef41Sopenharmony_ci#### `diff`
3831cb0ef41Sopenharmony_ci
3841cb0ef41Sopenharmony_ci* Default:
3851cb0ef41Sopenharmony_ci* Type: String (can be set multiple times)
3861cb0ef41Sopenharmony_ci
3871cb0ef41Sopenharmony_ciDefine arguments to compare in `npm diff`.
3881cb0ef41Sopenharmony_ci
3891cb0ef41Sopenharmony_ci
3901cb0ef41Sopenharmony_ci
3911cb0ef41Sopenharmony_ci#### `diff-dst-prefix`
3921cb0ef41Sopenharmony_ci
3931cb0ef41Sopenharmony_ci* Default: "b/"
3941cb0ef41Sopenharmony_ci* Type: String
3951cb0ef41Sopenharmony_ci
3961cb0ef41Sopenharmony_ciDestination prefix to be used in `npm diff` output.
3971cb0ef41Sopenharmony_ci
3981cb0ef41Sopenharmony_ci
3991cb0ef41Sopenharmony_ci
4001cb0ef41Sopenharmony_ci#### `diff-ignore-all-space`
4011cb0ef41Sopenharmony_ci
4021cb0ef41Sopenharmony_ci* Default: false
4031cb0ef41Sopenharmony_ci* Type: Boolean
4041cb0ef41Sopenharmony_ci
4051cb0ef41Sopenharmony_ciIgnore whitespace when comparing lines in `npm diff`.
4061cb0ef41Sopenharmony_ci
4071cb0ef41Sopenharmony_ci
4081cb0ef41Sopenharmony_ci
4091cb0ef41Sopenharmony_ci#### `diff-name-only`
4101cb0ef41Sopenharmony_ci
4111cb0ef41Sopenharmony_ci* Default: false
4121cb0ef41Sopenharmony_ci* Type: Boolean
4131cb0ef41Sopenharmony_ci
4141cb0ef41Sopenharmony_ciPrints only filenames when using `npm diff`.
4151cb0ef41Sopenharmony_ci
4161cb0ef41Sopenharmony_ci
4171cb0ef41Sopenharmony_ci
4181cb0ef41Sopenharmony_ci#### `diff-no-prefix`
4191cb0ef41Sopenharmony_ci
4201cb0ef41Sopenharmony_ci* Default: false
4211cb0ef41Sopenharmony_ci* Type: Boolean
4221cb0ef41Sopenharmony_ci
4231cb0ef41Sopenharmony_ciDo not show any source or destination prefix in `npm diff` output.
4241cb0ef41Sopenharmony_ci
4251cb0ef41Sopenharmony_ciNote: this causes `npm diff` to ignore the `--diff-src-prefix` and
4261cb0ef41Sopenharmony_ci`--diff-dst-prefix` configs.
4271cb0ef41Sopenharmony_ci
4281cb0ef41Sopenharmony_ci
4291cb0ef41Sopenharmony_ci
4301cb0ef41Sopenharmony_ci#### `diff-src-prefix`
4311cb0ef41Sopenharmony_ci
4321cb0ef41Sopenharmony_ci* Default: "a/"
4331cb0ef41Sopenharmony_ci* Type: String
4341cb0ef41Sopenharmony_ci
4351cb0ef41Sopenharmony_ciSource prefix to be used in `npm diff` output.
4361cb0ef41Sopenharmony_ci
4371cb0ef41Sopenharmony_ci
4381cb0ef41Sopenharmony_ci
4391cb0ef41Sopenharmony_ci#### `diff-text`
4401cb0ef41Sopenharmony_ci
4411cb0ef41Sopenharmony_ci* Default: false
4421cb0ef41Sopenharmony_ci* Type: Boolean
4431cb0ef41Sopenharmony_ci
4441cb0ef41Sopenharmony_ciTreat all files as text in `npm diff`.
4451cb0ef41Sopenharmony_ci
4461cb0ef41Sopenharmony_ci
4471cb0ef41Sopenharmony_ci
4481cb0ef41Sopenharmony_ci#### `diff-unified`
4491cb0ef41Sopenharmony_ci
4501cb0ef41Sopenharmony_ci* Default: 3
4511cb0ef41Sopenharmony_ci* Type: Number
4521cb0ef41Sopenharmony_ci
4531cb0ef41Sopenharmony_ciThe number of lines of context to print in `npm diff`.
4541cb0ef41Sopenharmony_ci
4551cb0ef41Sopenharmony_ci
4561cb0ef41Sopenharmony_ci
4571cb0ef41Sopenharmony_ci#### `dry-run`
4581cb0ef41Sopenharmony_ci
4591cb0ef41Sopenharmony_ci* Default: false
4601cb0ef41Sopenharmony_ci* Type: Boolean
4611cb0ef41Sopenharmony_ci
4621cb0ef41Sopenharmony_ciIndicates that you don't want npm to make any changes and that it should
4631cb0ef41Sopenharmony_cionly report what it would have done. This can be passed into any of the
4641cb0ef41Sopenharmony_cicommands that modify your local installation, eg, `install`, `update`,
4651cb0ef41Sopenharmony_ci`dedupe`, `uninstall`, as well as `pack` and `publish`.
4661cb0ef41Sopenharmony_ci
4671cb0ef41Sopenharmony_ciNote: This is NOT honored by other network related commands, eg `dist-tags`,
4681cb0ef41Sopenharmony_ci`owner`, etc.
4691cb0ef41Sopenharmony_ci
4701cb0ef41Sopenharmony_ci
4711cb0ef41Sopenharmony_ci
4721cb0ef41Sopenharmony_ci#### `editor`
4731cb0ef41Sopenharmony_ci
4741cb0ef41Sopenharmony_ci* Default: The EDITOR or VISUAL environment variables, or
4751cb0ef41Sopenharmony_ci  '%SYSTEMROOT%\notepad.exe' on Windows, or 'vi' on Unix systems
4761cb0ef41Sopenharmony_ci* Type: String
4771cb0ef41Sopenharmony_ci
4781cb0ef41Sopenharmony_ciThe command to run for `npm edit` and `npm config edit`.
4791cb0ef41Sopenharmony_ci
4801cb0ef41Sopenharmony_ci
4811cb0ef41Sopenharmony_ci
4821cb0ef41Sopenharmony_ci#### `engine-strict`
4831cb0ef41Sopenharmony_ci
4841cb0ef41Sopenharmony_ci* Default: false
4851cb0ef41Sopenharmony_ci* Type: Boolean
4861cb0ef41Sopenharmony_ci
4871cb0ef41Sopenharmony_ciIf set to true, then npm will stubbornly refuse to install (or even consider
4881cb0ef41Sopenharmony_ciinstalling) any package that claims to not be compatible with the current
4891cb0ef41Sopenharmony_ciNode.js version.
4901cb0ef41Sopenharmony_ci
4911cb0ef41Sopenharmony_ciThis can be overridden by setting the `--force` flag.
4921cb0ef41Sopenharmony_ci
4931cb0ef41Sopenharmony_ci
4941cb0ef41Sopenharmony_ci
4951cb0ef41Sopenharmony_ci#### `expect-result-count`
4961cb0ef41Sopenharmony_ci
4971cb0ef41Sopenharmony_ci* Default: null
4981cb0ef41Sopenharmony_ci* Type: null or Number
4991cb0ef41Sopenharmony_ci
5001cb0ef41Sopenharmony_ciTells to expect a specific number of results from the command.
5011cb0ef41Sopenharmony_ci
5021cb0ef41Sopenharmony_ciThis config can not be used with: `expect-results`
5031cb0ef41Sopenharmony_ci
5041cb0ef41Sopenharmony_ci#### `expect-results`
5051cb0ef41Sopenharmony_ci
5061cb0ef41Sopenharmony_ci* Default: null
5071cb0ef41Sopenharmony_ci* Type: null or Boolean
5081cb0ef41Sopenharmony_ci
5091cb0ef41Sopenharmony_ciTells npm whether or not to expect results from the command. Can be either
5101cb0ef41Sopenharmony_citrue (expect some results) or false (expect no results).
5111cb0ef41Sopenharmony_ci
5121cb0ef41Sopenharmony_ciThis config can not be used with: `expect-result-count`
5131cb0ef41Sopenharmony_ci
5141cb0ef41Sopenharmony_ci#### `fetch-retries`
5151cb0ef41Sopenharmony_ci
5161cb0ef41Sopenharmony_ci* Default: 2
5171cb0ef41Sopenharmony_ci* Type: Number
5181cb0ef41Sopenharmony_ci
5191cb0ef41Sopenharmony_ciThe "retries" config for the `retry` module to use when fetching packages
5201cb0ef41Sopenharmony_cifrom the registry.
5211cb0ef41Sopenharmony_ci
5221cb0ef41Sopenharmony_cinpm will retry idempotent read requests to the registry in the case of
5231cb0ef41Sopenharmony_cinetwork failures or 5xx HTTP errors.
5241cb0ef41Sopenharmony_ci
5251cb0ef41Sopenharmony_ci
5261cb0ef41Sopenharmony_ci
5271cb0ef41Sopenharmony_ci#### `fetch-retry-factor`
5281cb0ef41Sopenharmony_ci
5291cb0ef41Sopenharmony_ci* Default: 10
5301cb0ef41Sopenharmony_ci* Type: Number
5311cb0ef41Sopenharmony_ci
5321cb0ef41Sopenharmony_ciThe "factor" config for the `retry` module to use when fetching packages.
5331cb0ef41Sopenharmony_ci
5341cb0ef41Sopenharmony_ci
5351cb0ef41Sopenharmony_ci
5361cb0ef41Sopenharmony_ci#### `fetch-retry-maxtimeout`
5371cb0ef41Sopenharmony_ci
5381cb0ef41Sopenharmony_ci* Default: 60000 (1 minute)
5391cb0ef41Sopenharmony_ci* Type: Number
5401cb0ef41Sopenharmony_ci
5411cb0ef41Sopenharmony_ciThe "maxTimeout" config for the `retry` module to use when fetching
5421cb0ef41Sopenharmony_cipackages.
5431cb0ef41Sopenharmony_ci
5441cb0ef41Sopenharmony_ci
5451cb0ef41Sopenharmony_ci
5461cb0ef41Sopenharmony_ci#### `fetch-retry-mintimeout`
5471cb0ef41Sopenharmony_ci
5481cb0ef41Sopenharmony_ci* Default: 10000 (10 seconds)
5491cb0ef41Sopenharmony_ci* Type: Number
5501cb0ef41Sopenharmony_ci
5511cb0ef41Sopenharmony_ciThe "minTimeout" config for the `retry` module to use when fetching
5521cb0ef41Sopenharmony_cipackages.
5531cb0ef41Sopenharmony_ci
5541cb0ef41Sopenharmony_ci
5551cb0ef41Sopenharmony_ci
5561cb0ef41Sopenharmony_ci#### `fetch-timeout`
5571cb0ef41Sopenharmony_ci
5581cb0ef41Sopenharmony_ci* Default: 300000 (5 minutes)
5591cb0ef41Sopenharmony_ci* Type: Number
5601cb0ef41Sopenharmony_ci
5611cb0ef41Sopenharmony_ciThe maximum amount of time to wait for HTTP requests to complete.
5621cb0ef41Sopenharmony_ci
5631cb0ef41Sopenharmony_ci
5641cb0ef41Sopenharmony_ci
5651cb0ef41Sopenharmony_ci#### `force`
5661cb0ef41Sopenharmony_ci
5671cb0ef41Sopenharmony_ci* Default: false
5681cb0ef41Sopenharmony_ci* Type: Boolean
5691cb0ef41Sopenharmony_ci
5701cb0ef41Sopenharmony_ciRemoves various protections against unfortunate side effects, common
5711cb0ef41Sopenharmony_cimistakes, unnecessary performance degradation, and malicious input.
5721cb0ef41Sopenharmony_ci
5731cb0ef41Sopenharmony_ci* Allow clobbering non-npm files in global installs.
5741cb0ef41Sopenharmony_ci* Allow the `npm version` command to work on an unclean git repository.
5751cb0ef41Sopenharmony_ci* Allow deleting the cache folder with `npm cache clean`.
5761cb0ef41Sopenharmony_ci* Allow installing packages that have an `engines` declaration requiring a
5771cb0ef41Sopenharmony_ci  different version of npm.
5781cb0ef41Sopenharmony_ci* Allow installing packages that have an `engines` declaration requiring a
5791cb0ef41Sopenharmony_ci  different version of `node`, even if `--engine-strict` is enabled.
5801cb0ef41Sopenharmony_ci* Allow `npm audit fix` to install modules outside your stated dependency
5811cb0ef41Sopenharmony_ci  range (including SemVer-major changes).
5821cb0ef41Sopenharmony_ci* Allow unpublishing all versions of a published package.
5831cb0ef41Sopenharmony_ci* Allow conflicting peerDependencies to be installed in the root project.
5841cb0ef41Sopenharmony_ci* Implicitly set `--yes` during `npm init`.
5851cb0ef41Sopenharmony_ci* Allow clobbering existing values in `npm pkg`
5861cb0ef41Sopenharmony_ci* Allow unpublishing of entire packages (not just a single version).
5871cb0ef41Sopenharmony_ci
5881cb0ef41Sopenharmony_ciIf you don't have a clear idea of what you want to do, it is strongly
5891cb0ef41Sopenharmony_cirecommended that you do not use this option!
5901cb0ef41Sopenharmony_ci
5911cb0ef41Sopenharmony_ci
5921cb0ef41Sopenharmony_ci
5931cb0ef41Sopenharmony_ci#### `foreground-scripts`
5941cb0ef41Sopenharmony_ci
5951cb0ef41Sopenharmony_ci* Default: `false` unless when using `npm pack` or `npm publish` where it
5961cb0ef41Sopenharmony_ci  defaults to `true`
5971cb0ef41Sopenharmony_ci* Type: Boolean
5981cb0ef41Sopenharmony_ci
5991cb0ef41Sopenharmony_ciRun all build scripts (ie, `preinstall`, `install`, and `postinstall`)
6001cb0ef41Sopenharmony_ciscripts for installed packages in the foreground process, sharing standard
6011cb0ef41Sopenharmony_ciinput, output, and error with the main npm process.
6021cb0ef41Sopenharmony_ci
6031cb0ef41Sopenharmony_ciNote that this will generally make installs run slower, and be much noisier,
6041cb0ef41Sopenharmony_cibut can be useful for debugging.
6051cb0ef41Sopenharmony_ci
6061cb0ef41Sopenharmony_ci
6071cb0ef41Sopenharmony_ci
6081cb0ef41Sopenharmony_ci#### `format-package-lock`
6091cb0ef41Sopenharmony_ci
6101cb0ef41Sopenharmony_ci* Default: true
6111cb0ef41Sopenharmony_ci* Type: Boolean
6121cb0ef41Sopenharmony_ci
6131cb0ef41Sopenharmony_ciFormat `package-lock.json` or `npm-shrinkwrap.json` as a human readable
6141cb0ef41Sopenharmony_cifile.
6151cb0ef41Sopenharmony_ci
6161cb0ef41Sopenharmony_ci
6171cb0ef41Sopenharmony_ci
6181cb0ef41Sopenharmony_ci#### `fund`
6191cb0ef41Sopenharmony_ci
6201cb0ef41Sopenharmony_ci* Default: true
6211cb0ef41Sopenharmony_ci* Type: Boolean
6221cb0ef41Sopenharmony_ci
6231cb0ef41Sopenharmony_ciWhen "true" displays the message at the end of each `npm install`
6241cb0ef41Sopenharmony_ciacknowledging the number of dependencies looking for funding. See [`npm
6251cb0ef41Sopenharmony_cifund`](/commands/npm-fund) for details.
6261cb0ef41Sopenharmony_ci
6271cb0ef41Sopenharmony_ci
6281cb0ef41Sopenharmony_ci
6291cb0ef41Sopenharmony_ci#### `git`
6301cb0ef41Sopenharmony_ci
6311cb0ef41Sopenharmony_ci* Default: "git"
6321cb0ef41Sopenharmony_ci* Type: String
6331cb0ef41Sopenharmony_ci
6341cb0ef41Sopenharmony_ciThe command to use for git commands. If git is installed on the computer,
6351cb0ef41Sopenharmony_cibut is not in the `PATH`, then set this to the full path to the git binary.
6361cb0ef41Sopenharmony_ci
6371cb0ef41Sopenharmony_ci
6381cb0ef41Sopenharmony_ci
6391cb0ef41Sopenharmony_ci#### `git-tag-version`
6401cb0ef41Sopenharmony_ci
6411cb0ef41Sopenharmony_ci* Default: true
6421cb0ef41Sopenharmony_ci* Type: Boolean
6431cb0ef41Sopenharmony_ci
6441cb0ef41Sopenharmony_ciTag the commit when using the `npm version` command. Setting this to false
6451cb0ef41Sopenharmony_ciresults in no commit being made at all.
6461cb0ef41Sopenharmony_ci
6471cb0ef41Sopenharmony_ci
6481cb0ef41Sopenharmony_ci
6491cb0ef41Sopenharmony_ci#### `global`
6501cb0ef41Sopenharmony_ci
6511cb0ef41Sopenharmony_ci* Default: false
6521cb0ef41Sopenharmony_ci* Type: Boolean
6531cb0ef41Sopenharmony_ci
6541cb0ef41Sopenharmony_ciOperates in "global" mode, so that packages are installed into the `prefix`
6551cb0ef41Sopenharmony_cifolder instead of the current working directory. See
6561cb0ef41Sopenharmony_ci[folders](/configuring-npm/folders) for more on the differences in behavior.
6571cb0ef41Sopenharmony_ci
6581cb0ef41Sopenharmony_ci* packages are installed into the `{prefix}/lib/node_modules` folder, instead
6591cb0ef41Sopenharmony_ci  of the current working directory.
6601cb0ef41Sopenharmony_ci* bin files are linked to `{prefix}/bin`
6611cb0ef41Sopenharmony_ci* man pages are linked to `{prefix}/share/man`
6621cb0ef41Sopenharmony_ci
6631cb0ef41Sopenharmony_ci
6641cb0ef41Sopenharmony_ci
6651cb0ef41Sopenharmony_ci#### `globalconfig`
6661cb0ef41Sopenharmony_ci
6671cb0ef41Sopenharmony_ci* Default: The global --prefix setting plus 'etc/npmrc'. For example,
6681cb0ef41Sopenharmony_ci  '/usr/local/etc/npmrc'
6691cb0ef41Sopenharmony_ci* Type: Path
6701cb0ef41Sopenharmony_ci
6711cb0ef41Sopenharmony_ciThe config file to read for global config options.
6721cb0ef41Sopenharmony_ci
6731cb0ef41Sopenharmony_ci
6741cb0ef41Sopenharmony_ci
6751cb0ef41Sopenharmony_ci#### `heading`
6761cb0ef41Sopenharmony_ci
6771cb0ef41Sopenharmony_ci* Default: "npm"
6781cb0ef41Sopenharmony_ci* Type: String
6791cb0ef41Sopenharmony_ci
6801cb0ef41Sopenharmony_ciThe string that starts all the debugging log output.
6811cb0ef41Sopenharmony_ci
6821cb0ef41Sopenharmony_ci
6831cb0ef41Sopenharmony_ci
6841cb0ef41Sopenharmony_ci#### `https-proxy`
6851cb0ef41Sopenharmony_ci
6861cb0ef41Sopenharmony_ci* Default: null
6871cb0ef41Sopenharmony_ci* Type: null or URL
6881cb0ef41Sopenharmony_ci
6891cb0ef41Sopenharmony_ciA proxy to use for outgoing https requests. If the `HTTPS_PROXY` or
6901cb0ef41Sopenharmony_ci`https_proxy` or `HTTP_PROXY` or `http_proxy` environment variables are set,
6911cb0ef41Sopenharmony_ciproxy settings will be honored by the underlying `make-fetch-happen`
6921cb0ef41Sopenharmony_cilibrary.
6931cb0ef41Sopenharmony_ci
6941cb0ef41Sopenharmony_ci
6951cb0ef41Sopenharmony_ci
6961cb0ef41Sopenharmony_ci#### `if-present`
6971cb0ef41Sopenharmony_ci
6981cb0ef41Sopenharmony_ci* Default: false
6991cb0ef41Sopenharmony_ci* Type: Boolean
7001cb0ef41Sopenharmony_ci
7011cb0ef41Sopenharmony_ciIf true, npm will not exit with an error code when `run-script` is invoked
7021cb0ef41Sopenharmony_cifor a script that isn't defined in the `scripts` section of `package.json`.
7031cb0ef41Sopenharmony_ciThis option can be used when it's desirable to optionally run a script when
7041cb0ef41Sopenharmony_ciit's present and fail if the script fails. This is useful, for example, when
7051cb0ef41Sopenharmony_cirunning scripts that may only apply for some builds in an otherwise generic
7061cb0ef41Sopenharmony_ciCI setup.
7071cb0ef41Sopenharmony_ci
7081cb0ef41Sopenharmony_ciThis value is not exported to the environment for child processes.
7091cb0ef41Sopenharmony_ci
7101cb0ef41Sopenharmony_ci#### `ignore-scripts`
7111cb0ef41Sopenharmony_ci
7121cb0ef41Sopenharmony_ci* Default: false
7131cb0ef41Sopenharmony_ci* Type: Boolean
7141cb0ef41Sopenharmony_ci
7151cb0ef41Sopenharmony_ciIf true, npm does not run scripts specified in package.json files.
7161cb0ef41Sopenharmony_ci
7171cb0ef41Sopenharmony_ciNote that commands explicitly intended to run a particular script, such as
7181cb0ef41Sopenharmony_ci`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`
7191cb0ef41Sopenharmony_ciwill still run their intended script if `ignore-scripts` is set, but they
7201cb0ef41Sopenharmony_ciwill *not* run any pre- or post-scripts.
7211cb0ef41Sopenharmony_ci
7221cb0ef41Sopenharmony_ci
7231cb0ef41Sopenharmony_ci
7241cb0ef41Sopenharmony_ci#### `include`
7251cb0ef41Sopenharmony_ci
7261cb0ef41Sopenharmony_ci* Default:
7271cb0ef41Sopenharmony_ci* Type: "prod", "dev", "optional", or "peer" (can be set multiple times)
7281cb0ef41Sopenharmony_ci
7291cb0ef41Sopenharmony_ciOption that allows for defining which types of dependencies to install.
7301cb0ef41Sopenharmony_ci
7311cb0ef41Sopenharmony_ciThis is the inverse of `--omit=<type>`.
7321cb0ef41Sopenharmony_ci
7331cb0ef41Sopenharmony_ciDependency types specified in `--include` will not be omitted, regardless of
7341cb0ef41Sopenharmony_cithe order in which omit/include are specified on the command-line.
7351cb0ef41Sopenharmony_ci
7361cb0ef41Sopenharmony_ci
7371cb0ef41Sopenharmony_ci
7381cb0ef41Sopenharmony_ci#### `include-staged`
7391cb0ef41Sopenharmony_ci
7401cb0ef41Sopenharmony_ci* Default: false
7411cb0ef41Sopenharmony_ci* Type: Boolean
7421cb0ef41Sopenharmony_ci
7431cb0ef41Sopenharmony_ciAllow installing "staged" published packages, as defined by [npm RFC PR
7441cb0ef41Sopenharmony_ci#92](https://github.com/npm/rfcs/pull/92).
7451cb0ef41Sopenharmony_ci
7461cb0ef41Sopenharmony_ciThis is experimental, and not implemented by the npm public registry.
7471cb0ef41Sopenharmony_ci
7481cb0ef41Sopenharmony_ci
7491cb0ef41Sopenharmony_ci
7501cb0ef41Sopenharmony_ci#### `include-workspace-root`
7511cb0ef41Sopenharmony_ci
7521cb0ef41Sopenharmony_ci* Default: false
7531cb0ef41Sopenharmony_ci* Type: Boolean
7541cb0ef41Sopenharmony_ci
7551cb0ef41Sopenharmony_ciInclude the workspace root when workspaces are enabled for a command.
7561cb0ef41Sopenharmony_ci
7571cb0ef41Sopenharmony_ciWhen false, specifying individual workspaces via the `workspace` config, or
7581cb0ef41Sopenharmony_ciall workspaces via the `workspaces` flag, will cause npm to operate only on
7591cb0ef41Sopenharmony_cithe specified workspaces, and not on the root project.
7601cb0ef41Sopenharmony_ci
7611cb0ef41Sopenharmony_ciThis value is not exported to the environment for child processes.
7621cb0ef41Sopenharmony_ci
7631cb0ef41Sopenharmony_ci#### `init-author-email`
7641cb0ef41Sopenharmony_ci
7651cb0ef41Sopenharmony_ci* Default: ""
7661cb0ef41Sopenharmony_ci* Type: String
7671cb0ef41Sopenharmony_ci
7681cb0ef41Sopenharmony_ciThe value `npm init` should use by default for the package author's email.
7691cb0ef41Sopenharmony_ci
7701cb0ef41Sopenharmony_ci
7711cb0ef41Sopenharmony_ci
7721cb0ef41Sopenharmony_ci#### `init-author-name`
7731cb0ef41Sopenharmony_ci
7741cb0ef41Sopenharmony_ci* Default: ""
7751cb0ef41Sopenharmony_ci* Type: String
7761cb0ef41Sopenharmony_ci
7771cb0ef41Sopenharmony_ciThe value `npm init` should use by default for the package author's name.
7781cb0ef41Sopenharmony_ci
7791cb0ef41Sopenharmony_ci
7801cb0ef41Sopenharmony_ci
7811cb0ef41Sopenharmony_ci#### `init-author-url`
7821cb0ef41Sopenharmony_ci
7831cb0ef41Sopenharmony_ci* Default: ""
7841cb0ef41Sopenharmony_ci* Type: "" or URL
7851cb0ef41Sopenharmony_ci
7861cb0ef41Sopenharmony_ciThe value `npm init` should use by default for the package author's
7871cb0ef41Sopenharmony_cihomepage.
7881cb0ef41Sopenharmony_ci
7891cb0ef41Sopenharmony_ci
7901cb0ef41Sopenharmony_ci
7911cb0ef41Sopenharmony_ci#### `init-license`
7921cb0ef41Sopenharmony_ci
7931cb0ef41Sopenharmony_ci* Default: "ISC"
7941cb0ef41Sopenharmony_ci* Type: String
7951cb0ef41Sopenharmony_ci
7961cb0ef41Sopenharmony_ciThe value `npm init` should use by default for the package license.
7971cb0ef41Sopenharmony_ci
7981cb0ef41Sopenharmony_ci
7991cb0ef41Sopenharmony_ci
8001cb0ef41Sopenharmony_ci#### `init-module`
8011cb0ef41Sopenharmony_ci
8021cb0ef41Sopenharmony_ci* Default: "~/.npm-init.js"
8031cb0ef41Sopenharmony_ci* Type: Path
8041cb0ef41Sopenharmony_ci
8051cb0ef41Sopenharmony_ciA module that will be loaded by the `npm init` command. See the
8061cb0ef41Sopenharmony_cidocumentation for the
8071cb0ef41Sopenharmony_ci[init-package-json](https://github.com/npm/init-package-json) module for
8081cb0ef41Sopenharmony_cimore information, or [npm init](/commands/npm-init).
8091cb0ef41Sopenharmony_ci
8101cb0ef41Sopenharmony_ci
8111cb0ef41Sopenharmony_ci
8121cb0ef41Sopenharmony_ci#### `init-version`
8131cb0ef41Sopenharmony_ci
8141cb0ef41Sopenharmony_ci* Default: "1.0.0"
8151cb0ef41Sopenharmony_ci* Type: SemVer string
8161cb0ef41Sopenharmony_ci
8171cb0ef41Sopenharmony_ciThe value that `npm init` should use by default for the package version
8181cb0ef41Sopenharmony_cinumber, if not already set in package.json.
8191cb0ef41Sopenharmony_ci
8201cb0ef41Sopenharmony_ci
8211cb0ef41Sopenharmony_ci
8221cb0ef41Sopenharmony_ci#### `install-links`
8231cb0ef41Sopenharmony_ci
8241cb0ef41Sopenharmony_ci* Default: false
8251cb0ef41Sopenharmony_ci* Type: Boolean
8261cb0ef41Sopenharmony_ci
8271cb0ef41Sopenharmony_ciWhen set file: protocol dependencies will be packed and installed as regular
8281cb0ef41Sopenharmony_cidependencies instead of creating a symlink. This option has no effect on
8291cb0ef41Sopenharmony_ciworkspaces.
8301cb0ef41Sopenharmony_ci
8311cb0ef41Sopenharmony_ci
8321cb0ef41Sopenharmony_ci
8331cb0ef41Sopenharmony_ci#### `install-strategy`
8341cb0ef41Sopenharmony_ci
8351cb0ef41Sopenharmony_ci* Default: "hoisted"
8361cb0ef41Sopenharmony_ci* Type: "hoisted", "nested", "shallow", or "linked"
8371cb0ef41Sopenharmony_ci
8381cb0ef41Sopenharmony_ciSets the strategy for installing packages in node_modules. hoisted
8391cb0ef41Sopenharmony_ci(default): Install non-duplicated in top-level, and duplicated as necessary
8401cb0ef41Sopenharmony_ciwithin directory structure. nested: (formerly --legacy-bundling) install in
8411cb0ef41Sopenharmony_ciplace, no hoisting. shallow (formerly --global-style) only install direct
8421cb0ef41Sopenharmony_cideps at top-level. linked: (experimental) install in node_modules/.store,
8431cb0ef41Sopenharmony_cilink in place, unhoisted.
8441cb0ef41Sopenharmony_ci
8451cb0ef41Sopenharmony_ci
8461cb0ef41Sopenharmony_ci
8471cb0ef41Sopenharmony_ci#### `json`
8481cb0ef41Sopenharmony_ci
8491cb0ef41Sopenharmony_ci* Default: false
8501cb0ef41Sopenharmony_ci* Type: Boolean
8511cb0ef41Sopenharmony_ci
8521cb0ef41Sopenharmony_ciWhether or not to output JSON data, rather than the normal output.
8531cb0ef41Sopenharmony_ci
8541cb0ef41Sopenharmony_ci* In `npm pkg set` it enables parsing set values with JSON.parse() before
8551cb0ef41Sopenharmony_ci  saving them to your `package.json`.
8561cb0ef41Sopenharmony_ci
8571cb0ef41Sopenharmony_ciNot supported by all npm commands.
8581cb0ef41Sopenharmony_ci
8591cb0ef41Sopenharmony_ci
8601cb0ef41Sopenharmony_ci
8611cb0ef41Sopenharmony_ci#### `legacy-peer-deps`
8621cb0ef41Sopenharmony_ci
8631cb0ef41Sopenharmony_ci* Default: false
8641cb0ef41Sopenharmony_ci* Type: Boolean
8651cb0ef41Sopenharmony_ci
8661cb0ef41Sopenharmony_ciCauses npm to completely ignore `peerDependencies` when building a package
8671cb0ef41Sopenharmony_citree, as in npm versions 3 through 6.
8681cb0ef41Sopenharmony_ci
8691cb0ef41Sopenharmony_ciIf a package cannot be installed because of overly strict `peerDependencies`
8701cb0ef41Sopenharmony_cithat collide, it provides a way to move forward resolving the situation.
8711cb0ef41Sopenharmony_ci
8721cb0ef41Sopenharmony_ciThis differs from `--omit=peer`, in that `--omit=peer` will avoid unpacking
8731cb0ef41Sopenharmony_ci`peerDependencies` on disk, but will still design a tree such that
8741cb0ef41Sopenharmony_ci`peerDependencies` _could_ be unpacked in a correct place.
8751cb0ef41Sopenharmony_ci
8761cb0ef41Sopenharmony_ciUse of `legacy-peer-deps` is not recommended, as it will not enforce the
8771cb0ef41Sopenharmony_ci`peerDependencies` contract that meta-dependencies may rely on.
8781cb0ef41Sopenharmony_ci
8791cb0ef41Sopenharmony_ci
8801cb0ef41Sopenharmony_ci
8811cb0ef41Sopenharmony_ci#### `libc`
8821cb0ef41Sopenharmony_ci
8831cb0ef41Sopenharmony_ci* Default: null
8841cb0ef41Sopenharmony_ci* Type: null or String
8851cb0ef41Sopenharmony_ci
8861cb0ef41Sopenharmony_ciOverride libc of native modules to install. Acceptable values are same as
8871cb0ef41Sopenharmony_ci`libc` field of package.json
8881cb0ef41Sopenharmony_ci
8891cb0ef41Sopenharmony_ci
8901cb0ef41Sopenharmony_ci
8911cb0ef41Sopenharmony_ci#### `link`
8921cb0ef41Sopenharmony_ci
8931cb0ef41Sopenharmony_ci* Default: false
8941cb0ef41Sopenharmony_ci* Type: Boolean
8951cb0ef41Sopenharmony_ci
8961cb0ef41Sopenharmony_ciUsed with `npm ls`, limiting output to only those packages that are linked.
8971cb0ef41Sopenharmony_ci
8981cb0ef41Sopenharmony_ci
8991cb0ef41Sopenharmony_ci
9001cb0ef41Sopenharmony_ci#### `local-address`
9011cb0ef41Sopenharmony_ci
9021cb0ef41Sopenharmony_ci* Default: null
9031cb0ef41Sopenharmony_ci* Type: IP Address
9041cb0ef41Sopenharmony_ci
9051cb0ef41Sopenharmony_ciThe IP address of the local interface to use when making connections to the
9061cb0ef41Sopenharmony_cinpm registry. Must be IPv4 in versions of Node prior to 0.12.
9071cb0ef41Sopenharmony_ci
9081cb0ef41Sopenharmony_ci
9091cb0ef41Sopenharmony_ci
9101cb0ef41Sopenharmony_ci#### `location`
9111cb0ef41Sopenharmony_ci
9121cb0ef41Sopenharmony_ci* Default: "user" unless `--global` is passed, which will also set this value
9131cb0ef41Sopenharmony_ci  to "global"
9141cb0ef41Sopenharmony_ci* Type: "global", "user", or "project"
9151cb0ef41Sopenharmony_ci
9161cb0ef41Sopenharmony_ciWhen passed to `npm config` this refers to which config file to use.
9171cb0ef41Sopenharmony_ci
9181cb0ef41Sopenharmony_ciWhen set to "global" mode, packages are installed into the `prefix` folder
9191cb0ef41Sopenharmony_ciinstead of the current working directory. See
9201cb0ef41Sopenharmony_ci[folders](/configuring-npm/folders) for more on the differences in behavior.
9211cb0ef41Sopenharmony_ci
9221cb0ef41Sopenharmony_ci* packages are installed into the `{prefix}/lib/node_modules` folder, instead
9231cb0ef41Sopenharmony_ci  of the current working directory.
9241cb0ef41Sopenharmony_ci* bin files are linked to `{prefix}/bin`
9251cb0ef41Sopenharmony_ci* man pages are linked to `{prefix}/share/man`
9261cb0ef41Sopenharmony_ci
9271cb0ef41Sopenharmony_ci
9281cb0ef41Sopenharmony_ci
9291cb0ef41Sopenharmony_ci#### `lockfile-version`
9301cb0ef41Sopenharmony_ci
9311cb0ef41Sopenharmony_ci* Default: Version 3 if no lockfile, auto-converting v1 lockfiles to v3,
9321cb0ef41Sopenharmony_ci  otherwise maintain current lockfile version.
9331cb0ef41Sopenharmony_ci* Type: null, 1, 2, 3, "1", "2", or "3"
9341cb0ef41Sopenharmony_ci
9351cb0ef41Sopenharmony_ciSet the lockfile format version to be used in package-lock.json and
9361cb0ef41Sopenharmony_cinpm-shrinkwrap-json files. Possible options are:
9371cb0ef41Sopenharmony_ci
9381cb0ef41Sopenharmony_ci1: The lockfile version used by npm versions 5 and 6. Lacks some data that
9391cb0ef41Sopenharmony_ciis used during the install, resulting in slower and possibly less
9401cb0ef41Sopenharmony_cideterministic installs. Prevents lockfile churn when interoperating with
9411cb0ef41Sopenharmony_ciolder npm versions.
9421cb0ef41Sopenharmony_ci
9431cb0ef41Sopenharmony_ci2: The default lockfile version used by npm version 7 and 8. Includes both
9441cb0ef41Sopenharmony_cithe version 1 lockfile data and version 3 lockfile data, for maximum
9451cb0ef41Sopenharmony_cideterminism and interoperability, at the expense of more bytes on disk.
9461cb0ef41Sopenharmony_ci
9471cb0ef41Sopenharmony_ci3: Only the new lockfile information introduced in npm version 7. Smaller on
9481cb0ef41Sopenharmony_cidisk than lockfile version 2, but not interoperable with older npm versions.
9491cb0ef41Sopenharmony_ciIdeal if all users are on npm version 7 and higher.
9501cb0ef41Sopenharmony_ci
9511cb0ef41Sopenharmony_ci
9521cb0ef41Sopenharmony_ci
9531cb0ef41Sopenharmony_ci#### `loglevel`
9541cb0ef41Sopenharmony_ci
9551cb0ef41Sopenharmony_ci* Default: "notice"
9561cb0ef41Sopenharmony_ci* Type: "silent", "error", "warn", "notice", "http", "info", "verbose", or
9571cb0ef41Sopenharmony_ci  "silly"
9581cb0ef41Sopenharmony_ci
9591cb0ef41Sopenharmony_ciWhat level of logs to report. All logs are written to a debug log, with the
9601cb0ef41Sopenharmony_cipath to that file printed if the execution of a command fails.
9611cb0ef41Sopenharmony_ci
9621cb0ef41Sopenharmony_ciAny logs of a higher level than the setting are shown. The default is
9631cb0ef41Sopenharmony_ci"notice".
9641cb0ef41Sopenharmony_ci
9651cb0ef41Sopenharmony_ciSee also the `foreground-scripts` config.
9661cb0ef41Sopenharmony_ci
9671cb0ef41Sopenharmony_ci
9681cb0ef41Sopenharmony_ci
9691cb0ef41Sopenharmony_ci#### `logs-dir`
9701cb0ef41Sopenharmony_ci
9711cb0ef41Sopenharmony_ci* Default: A directory named `_logs` inside the cache
9721cb0ef41Sopenharmony_ci* Type: null or Path
9731cb0ef41Sopenharmony_ci
9741cb0ef41Sopenharmony_ciThe location of npm's log directory. See [`npm logging`](/using-npm/logging)
9751cb0ef41Sopenharmony_cifor more information.
9761cb0ef41Sopenharmony_ci
9771cb0ef41Sopenharmony_ci
9781cb0ef41Sopenharmony_ci
9791cb0ef41Sopenharmony_ci#### `logs-max`
9801cb0ef41Sopenharmony_ci
9811cb0ef41Sopenharmony_ci* Default: 10
9821cb0ef41Sopenharmony_ci* Type: Number
9831cb0ef41Sopenharmony_ci
9841cb0ef41Sopenharmony_ciThe maximum number of log files to store.
9851cb0ef41Sopenharmony_ci
9861cb0ef41Sopenharmony_ciIf set to 0, no log files will be written for the current run.
9871cb0ef41Sopenharmony_ci
9881cb0ef41Sopenharmony_ci
9891cb0ef41Sopenharmony_ci
9901cb0ef41Sopenharmony_ci#### `long`
9911cb0ef41Sopenharmony_ci
9921cb0ef41Sopenharmony_ci* Default: false
9931cb0ef41Sopenharmony_ci* Type: Boolean
9941cb0ef41Sopenharmony_ci
9951cb0ef41Sopenharmony_ciShow extended information in `ls`, `search`, and `help-search`.
9961cb0ef41Sopenharmony_ci
9971cb0ef41Sopenharmony_ci
9981cb0ef41Sopenharmony_ci
9991cb0ef41Sopenharmony_ci#### `maxsockets`
10001cb0ef41Sopenharmony_ci
10011cb0ef41Sopenharmony_ci* Default: 15
10021cb0ef41Sopenharmony_ci* Type: Number
10031cb0ef41Sopenharmony_ci
10041cb0ef41Sopenharmony_ciThe maximum number of connections to use per origin (protocol/host/port
10051cb0ef41Sopenharmony_cicombination).
10061cb0ef41Sopenharmony_ci
10071cb0ef41Sopenharmony_ci
10081cb0ef41Sopenharmony_ci
10091cb0ef41Sopenharmony_ci#### `message`
10101cb0ef41Sopenharmony_ci
10111cb0ef41Sopenharmony_ci* Default: "%s"
10121cb0ef41Sopenharmony_ci* Type: String
10131cb0ef41Sopenharmony_ci
10141cb0ef41Sopenharmony_ciCommit message which is used by `npm version` when creating version commit.
10151cb0ef41Sopenharmony_ci
10161cb0ef41Sopenharmony_ciAny "%s" in the message will be replaced with the version number.
10171cb0ef41Sopenharmony_ci
10181cb0ef41Sopenharmony_ci
10191cb0ef41Sopenharmony_ci
10201cb0ef41Sopenharmony_ci#### `node-options`
10211cb0ef41Sopenharmony_ci
10221cb0ef41Sopenharmony_ci* Default: null
10231cb0ef41Sopenharmony_ci* Type: null or String
10241cb0ef41Sopenharmony_ci
10251cb0ef41Sopenharmony_ciOptions to pass through to Node.js via the `NODE_OPTIONS` environment
10261cb0ef41Sopenharmony_civariable. This does not impact how npm itself is executed but it does impact
10271cb0ef41Sopenharmony_cihow lifecycle scripts are called.
10281cb0ef41Sopenharmony_ci
10291cb0ef41Sopenharmony_ci
10301cb0ef41Sopenharmony_ci
10311cb0ef41Sopenharmony_ci#### `noproxy`
10321cb0ef41Sopenharmony_ci
10331cb0ef41Sopenharmony_ci* Default: The value of the NO_PROXY environment variable
10341cb0ef41Sopenharmony_ci* Type: String (can be set multiple times)
10351cb0ef41Sopenharmony_ci
10361cb0ef41Sopenharmony_ciDomain extensions that should bypass any proxies.
10371cb0ef41Sopenharmony_ci
10381cb0ef41Sopenharmony_ciAlso accepts a comma-delimited string.
10391cb0ef41Sopenharmony_ci
10401cb0ef41Sopenharmony_ci
10411cb0ef41Sopenharmony_ci
10421cb0ef41Sopenharmony_ci#### `offline`
10431cb0ef41Sopenharmony_ci
10441cb0ef41Sopenharmony_ci* Default: false
10451cb0ef41Sopenharmony_ci* Type: Boolean
10461cb0ef41Sopenharmony_ci
10471cb0ef41Sopenharmony_ciForce offline mode: no network requests will be done during install. To
10481cb0ef41Sopenharmony_ciallow the CLI to fill in missing cache data, see `--prefer-offline`.
10491cb0ef41Sopenharmony_ci
10501cb0ef41Sopenharmony_ci
10511cb0ef41Sopenharmony_ci
10521cb0ef41Sopenharmony_ci#### `omit`
10531cb0ef41Sopenharmony_ci
10541cb0ef41Sopenharmony_ci* Default: 'dev' if the `NODE_ENV` environment variable is set to
10551cb0ef41Sopenharmony_ci  'production', otherwise empty.
10561cb0ef41Sopenharmony_ci* Type: "dev", "optional", or "peer" (can be set multiple times)
10571cb0ef41Sopenharmony_ci
10581cb0ef41Sopenharmony_ciDependency types to omit from the installation tree on disk.
10591cb0ef41Sopenharmony_ci
10601cb0ef41Sopenharmony_ciNote that these dependencies _are_ still resolved and added to the
10611cb0ef41Sopenharmony_ci`package-lock.json` or `npm-shrinkwrap.json` file. They are just not
10621cb0ef41Sopenharmony_ciphysically installed on disk.
10631cb0ef41Sopenharmony_ci
10641cb0ef41Sopenharmony_ciIf a package type appears in both the `--include` and `--omit` lists, then
10651cb0ef41Sopenharmony_ciit will be included.
10661cb0ef41Sopenharmony_ci
10671cb0ef41Sopenharmony_ciIf the resulting omit list includes `'dev'`, then the `NODE_ENV` environment
10681cb0ef41Sopenharmony_civariable will be set to `'production'` for all lifecycle scripts.
10691cb0ef41Sopenharmony_ci
10701cb0ef41Sopenharmony_ci
10711cb0ef41Sopenharmony_ci
10721cb0ef41Sopenharmony_ci#### `omit-lockfile-registry-resolved`
10731cb0ef41Sopenharmony_ci
10741cb0ef41Sopenharmony_ci* Default: false
10751cb0ef41Sopenharmony_ci* Type: Boolean
10761cb0ef41Sopenharmony_ci
10771cb0ef41Sopenharmony_ciThis option causes npm to create lock files without a `resolved` key for
10781cb0ef41Sopenharmony_ciregistry dependencies. Subsequent installs will need to resolve tarball
10791cb0ef41Sopenharmony_ciendpoints with the configured registry, likely resulting in a longer install
10801cb0ef41Sopenharmony_citime.
10811cb0ef41Sopenharmony_ci
10821cb0ef41Sopenharmony_ci
10831cb0ef41Sopenharmony_ci
10841cb0ef41Sopenharmony_ci#### `os`
10851cb0ef41Sopenharmony_ci
10861cb0ef41Sopenharmony_ci* Default: null
10871cb0ef41Sopenharmony_ci* Type: null or String
10881cb0ef41Sopenharmony_ci
10891cb0ef41Sopenharmony_ciOverride OS of native modules to install. Acceptable values are same as `os`
10901cb0ef41Sopenharmony_cifield of package.json, which comes from `process.platform`.
10911cb0ef41Sopenharmony_ci
10921cb0ef41Sopenharmony_ci
10931cb0ef41Sopenharmony_ci
10941cb0ef41Sopenharmony_ci#### `otp`
10951cb0ef41Sopenharmony_ci
10961cb0ef41Sopenharmony_ci* Default: null
10971cb0ef41Sopenharmony_ci* Type: null or String
10981cb0ef41Sopenharmony_ci
10991cb0ef41Sopenharmony_ciThis is a one-time password from a two-factor authenticator. It's needed
11001cb0ef41Sopenharmony_ciwhen publishing or changing package permissions with `npm access`.
11011cb0ef41Sopenharmony_ci
11021cb0ef41Sopenharmony_ciIf not set, and a registry response fails with a challenge for a one-time
11031cb0ef41Sopenharmony_cipassword, npm will prompt on the command line for one.
11041cb0ef41Sopenharmony_ci
11051cb0ef41Sopenharmony_ci
11061cb0ef41Sopenharmony_ci
11071cb0ef41Sopenharmony_ci#### `pack-destination`
11081cb0ef41Sopenharmony_ci
11091cb0ef41Sopenharmony_ci* Default: "."
11101cb0ef41Sopenharmony_ci* Type: String
11111cb0ef41Sopenharmony_ci
11121cb0ef41Sopenharmony_ciDirectory in which `npm pack` will save tarballs.
11131cb0ef41Sopenharmony_ci
11141cb0ef41Sopenharmony_ci
11151cb0ef41Sopenharmony_ci
11161cb0ef41Sopenharmony_ci#### `package`
11171cb0ef41Sopenharmony_ci
11181cb0ef41Sopenharmony_ci* Default:
11191cb0ef41Sopenharmony_ci* Type: String (can be set multiple times)
11201cb0ef41Sopenharmony_ci
11211cb0ef41Sopenharmony_ciThe package or packages to install for [`npm exec`](/commands/npm-exec)
11221cb0ef41Sopenharmony_ci
11231cb0ef41Sopenharmony_ci
11241cb0ef41Sopenharmony_ci
11251cb0ef41Sopenharmony_ci#### `package-lock`
11261cb0ef41Sopenharmony_ci
11271cb0ef41Sopenharmony_ci* Default: true
11281cb0ef41Sopenharmony_ci* Type: Boolean
11291cb0ef41Sopenharmony_ci
11301cb0ef41Sopenharmony_ciIf set to false, then ignore `package-lock.json` files when installing. This
11311cb0ef41Sopenharmony_ciwill also prevent _writing_ `package-lock.json` if `save` is true.
11321cb0ef41Sopenharmony_ci
11331cb0ef41Sopenharmony_ci
11341cb0ef41Sopenharmony_ci
11351cb0ef41Sopenharmony_ci#### `package-lock-only`
11361cb0ef41Sopenharmony_ci
11371cb0ef41Sopenharmony_ci* Default: false
11381cb0ef41Sopenharmony_ci* Type: Boolean
11391cb0ef41Sopenharmony_ci
11401cb0ef41Sopenharmony_ciIf set to true, the current operation will only use the `package-lock.json`,
11411cb0ef41Sopenharmony_ciignoring `node_modules`.
11421cb0ef41Sopenharmony_ci
11431cb0ef41Sopenharmony_ciFor `update` this means only the `package-lock.json` will be updated,
11441cb0ef41Sopenharmony_ciinstead of checking `node_modules` and downloading dependencies.
11451cb0ef41Sopenharmony_ci
11461cb0ef41Sopenharmony_ciFor `list` this means the output will be based on the tree described by the
11471cb0ef41Sopenharmony_ci`package-lock.json`, rather than the contents of `node_modules`.
11481cb0ef41Sopenharmony_ci
11491cb0ef41Sopenharmony_ci
11501cb0ef41Sopenharmony_ci
11511cb0ef41Sopenharmony_ci#### `parseable`
11521cb0ef41Sopenharmony_ci
11531cb0ef41Sopenharmony_ci* Default: false
11541cb0ef41Sopenharmony_ci* Type: Boolean
11551cb0ef41Sopenharmony_ci
11561cb0ef41Sopenharmony_ciOutput parseable results from commands that write to standard output. For
11571cb0ef41Sopenharmony_ci`npm search`, this will be tab-separated table format.
11581cb0ef41Sopenharmony_ci
11591cb0ef41Sopenharmony_ci
11601cb0ef41Sopenharmony_ci
11611cb0ef41Sopenharmony_ci#### `prefer-dedupe`
11621cb0ef41Sopenharmony_ci
11631cb0ef41Sopenharmony_ci* Default: false
11641cb0ef41Sopenharmony_ci* Type: Boolean
11651cb0ef41Sopenharmony_ci
11661cb0ef41Sopenharmony_ciPrefer to deduplicate packages if possible, rather than choosing a newer
11671cb0ef41Sopenharmony_civersion of a dependency.
11681cb0ef41Sopenharmony_ci
11691cb0ef41Sopenharmony_ci
11701cb0ef41Sopenharmony_ci
11711cb0ef41Sopenharmony_ci#### `prefer-offline`
11721cb0ef41Sopenharmony_ci
11731cb0ef41Sopenharmony_ci* Default: false
11741cb0ef41Sopenharmony_ci* Type: Boolean
11751cb0ef41Sopenharmony_ci
11761cb0ef41Sopenharmony_ciIf true, staleness checks for cached data will be bypassed, but missing data
11771cb0ef41Sopenharmony_ciwill be requested from the server. To force full offline mode, use
11781cb0ef41Sopenharmony_ci`--offline`.
11791cb0ef41Sopenharmony_ci
11801cb0ef41Sopenharmony_ci
11811cb0ef41Sopenharmony_ci
11821cb0ef41Sopenharmony_ci#### `prefer-online`
11831cb0ef41Sopenharmony_ci
11841cb0ef41Sopenharmony_ci* Default: false
11851cb0ef41Sopenharmony_ci* Type: Boolean
11861cb0ef41Sopenharmony_ci
11871cb0ef41Sopenharmony_ciIf true, staleness checks for cached data will be forced, making the CLI
11881cb0ef41Sopenharmony_cilook for updates immediately even for fresh package data.
11891cb0ef41Sopenharmony_ci
11901cb0ef41Sopenharmony_ci
11911cb0ef41Sopenharmony_ci
11921cb0ef41Sopenharmony_ci#### `prefix`
11931cb0ef41Sopenharmony_ci
11941cb0ef41Sopenharmony_ci* Default: In global mode, the folder where the node executable is installed.
11951cb0ef41Sopenharmony_ci  Otherwise, the nearest parent folder containing either a package.json file
11961cb0ef41Sopenharmony_ci  or a node_modules folder.
11971cb0ef41Sopenharmony_ci* Type: Path
11981cb0ef41Sopenharmony_ci
11991cb0ef41Sopenharmony_ciThe location to install global items. If set on the command line, then it
12001cb0ef41Sopenharmony_ciforces non-global commands to run in the specified folder.
12011cb0ef41Sopenharmony_ci
12021cb0ef41Sopenharmony_ci
12031cb0ef41Sopenharmony_ci
12041cb0ef41Sopenharmony_ci#### `preid`
12051cb0ef41Sopenharmony_ci
12061cb0ef41Sopenharmony_ci* Default: ""
12071cb0ef41Sopenharmony_ci* Type: String
12081cb0ef41Sopenharmony_ci
12091cb0ef41Sopenharmony_ciThe "prerelease identifier" to use as a prefix for the "prerelease" part of
12101cb0ef41Sopenharmony_cia semver. Like the `rc` in `1.2.0-rc.8`.
12111cb0ef41Sopenharmony_ci
12121cb0ef41Sopenharmony_ci
12131cb0ef41Sopenharmony_ci
12141cb0ef41Sopenharmony_ci#### `progress`
12151cb0ef41Sopenharmony_ci
12161cb0ef41Sopenharmony_ci* Default: `true` unless running in a known CI system
12171cb0ef41Sopenharmony_ci* Type: Boolean
12181cb0ef41Sopenharmony_ci
12191cb0ef41Sopenharmony_ciWhen set to `true`, npm will display a progress bar during time intensive
12201cb0ef41Sopenharmony_cioperations, if `process.stderr` is a TTY.
12211cb0ef41Sopenharmony_ci
12221cb0ef41Sopenharmony_ciSet to `false` to suppress the progress bar.
12231cb0ef41Sopenharmony_ci
12241cb0ef41Sopenharmony_ci
12251cb0ef41Sopenharmony_ci
12261cb0ef41Sopenharmony_ci#### `provenance`
12271cb0ef41Sopenharmony_ci
12281cb0ef41Sopenharmony_ci* Default: false
12291cb0ef41Sopenharmony_ci* Type: Boolean
12301cb0ef41Sopenharmony_ci
12311cb0ef41Sopenharmony_ciWhen publishing from a supported cloud CI/CD system, the package will be
12321cb0ef41Sopenharmony_cipublicly linked to where it was built and published from.
12331cb0ef41Sopenharmony_ci
12341cb0ef41Sopenharmony_ciThis config can not be used with: `provenance-file`
12351cb0ef41Sopenharmony_ci
12361cb0ef41Sopenharmony_ci#### `provenance-file`
12371cb0ef41Sopenharmony_ci
12381cb0ef41Sopenharmony_ci* Default: null
12391cb0ef41Sopenharmony_ci* Type: Path
12401cb0ef41Sopenharmony_ci
12411cb0ef41Sopenharmony_ciWhen publishing, the provenance bundle at the given path will be used.
12421cb0ef41Sopenharmony_ci
12431cb0ef41Sopenharmony_ciThis config can not be used with: `provenance`
12441cb0ef41Sopenharmony_ci
12451cb0ef41Sopenharmony_ci#### `proxy`
12461cb0ef41Sopenharmony_ci
12471cb0ef41Sopenharmony_ci* Default: null
12481cb0ef41Sopenharmony_ci* Type: null, false, or URL
12491cb0ef41Sopenharmony_ci
12501cb0ef41Sopenharmony_ciA proxy to use for outgoing http requests. If the `HTTP_PROXY` or
12511cb0ef41Sopenharmony_ci`http_proxy` environment variables are set, proxy settings will be honored
12521cb0ef41Sopenharmony_ciby the underlying `request` library.
12531cb0ef41Sopenharmony_ci
12541cb0ef41Sopenharmony_ci
12551cb0ef41Sopenharmony_ci
12561cb0ef41Sopenharmony_ci#### `read-only`
12571cb0ef41Sopenharmony_ci
12581cb0ef41Sopenharmony_ci* Default: false
12591cb0ef41Sopenharmony_ci* Type: Boolean
12601cb0ef41Sopenharmony_ci
12611cb0ef41Sopenharmony_ciThis is used to mark a token as unable to publish when configuring limited
12621cb0ef41Sopenharmony_ciaccess tokens with the `npm token create` command.
12631cb0ef41Sopenharmony_ci
12641cb0ef41Sopenharmony_ci
12651cb0ef41Sopenharmony_ci
12661cb0ef41Sopenharmony_ci#### `rebuild-bundle`
12671cb0ef41Sopenharmony_ci
12681cb0ef41Sopenharmony_ci* Default: true
12691cb0ef41Sopenharmony_ci* Type: Boolean
12701cb0ef41Sopenharmony_ci
12711cb0ef41Sopenharmony_ciRebuild bundled dependencies after installation.
12721cb0ef41Sopenharmony_ci
12731cb0ef41Sopenharmony_ci
12741cb0ef41Sopenharmony_ci
12751cb0ef41Sopenharmony_ci#### `registry`
12761cb0ef41Sopenharmony_ci
12771cb0ef41Sopenharmony_ci* Default: "https://registry.npmjs.org/"
12781cb0ef41Sopenharmony_ci* Type: URL
12791cb0ef41Sopenharmony_ci
12801cb0ef41Sopenharmony_ciThe base URL of the npm registry.
12811cb0ef41Sopenharmony_ci
12821cb0ef41Sopenharmony_ci
12831cb0ef41Sopenharmony_ci
12841cb0ef41Sopenharmony_ci#### `replace-registry-host`
12851cb0ef41Sopenharmony_ci
12861cb0ef41Sopenharmony_ci* Default: "npmjs"
12871cb0ef41Sopenharmony_ci* Type: "npmjs", "never", "always", or String
12881cb0ef41Sopenharmony_ci
12891cb0ef41Sopenharmony_ciDefines behavior for replacing the registry host in a lockfile with the
12901cb0ef41Sopenharmony_ciconfigured registry.
12911cb0ef41Sopenharmony_ci
12921cb0ef41Sopenharmony_ciThe default behavior is to replace package dist URLs from the default
12931cb0ef41Sopenharmony_ciregistry (https://registry.npmjs.org) to the configured registry. If set to
12941cb0ef41Sopenharmony_ci"never", then use the registry value. If set to "always", then replace the
12951cb0ef41Sopenharmony_ciregistry host with the configured host every time.
12961cb0ef41Sopenharmony_ci
12971cb0ef41Sopenharmony_ciYou may also specify a bare hostname (e.g., "registry.npmjs.org").
12981cb0ef41Sopenharmony_ci
12991cb0ef41Sopenharmony_ci
13001cb0ef41Sopenharmony_ci
13011cb0ef41Sopenharmony_ci#### `save`
13021cb0ef41Sopenharmony_ci
13031cb0ef41Sopenharmony_ci* Default: `true` unless when using `npm update` where it defaults to `false`
13041cb0ef41Sopenharmony_ci* Type: Boolean
13051cb0ef41Sopenharmony_ci
13061cb0ef41Sopenharmony_ciSave installed packages to a `package.json` file as dependencies.
13071cb0ef41Sopenharmony_ci
13081cb0ef41Sopenharmony_ciWhen used with the `npm rm` command, removes the dependency from
13091cb0ef41Sopenharmony_ci`package.json`.
13101cb0ef41Sopenharmony_ci
13111cb0ef41Sopenharmony_ciWill also prevent writing to `package-lock.json` if set to `false`.
13121cb0ef41Sopenharmony_ci
13131cb0ef41Sopenharmony_ci
13141cb0ef41Sopenharmony_ci
13151cb0ef41Sopenharmony_ci#### `save-bundle`
13161cb0ef41Sopenharmony_ci
13171cb0ef41Sopenharmony_ci* Default: false
13181cb0ef41Sopenharmony_ci* Type: Boolean
13191cb0ef41Sopenharmony_ci
13201cb0ef41Sopenharmony_ciIf a package would be saved at install time by the use of `--save`,
13211cb0ef41Sopenharmony_ci`--save-dev`, or `--save-optional`, then also put it in the
13221cb0ef41Sopenharmony_ci`bundleDependencies` list.
13231cb0ef41Sopenharmony_ci
13241cb0ef41Sopenharmony_ciIgnored if `--save-peer` is set, since peerDependencies cannot be bundled.
13251cb0ef41Sopenharmony_ci
13261cb0ef41Sopenharmony_ci
13271cb0ef41Sopenharmony_ci
13281cb0ef41Sopenharmony_ci#### `save-dev`
13291cb0ef41Sopenharmony_ci
13301cb0ef41Sopenharmony_ci* Default: false
13311cb0ef41Sopenharmony_ci* Type: Boolean
13321cb0ef41Sopenharmony_ci
13331cb0ef41Sopenharmony_ciSave installed packages to a package.json file as `devDependencies`.
13341cb0ef41Sopenharmony_ci
13351cb0ef41Sopenharmony_ci
13361cb0ef41Sopenharmony_ci
13371cb0ef41Sopenharmony_ci#### `save-exact`
13381cb0ef41Sopenharmony_ci
13391cb0ef41Sopenharmony_ci* Default: false
13401cb0ef41Sopenharmony_ci* Type: Boolean
13411cb0ef41Sopenharmony_ci
13421cb0ef41Sopenharmony_ciDependencies saved to package.json will be configured with an exact version
13431cb0ef41Sopenharmony_cirather than using npm's default semver range operator.
13441cb0ef41Sopenharmony_ci
13451cb0ef41Sopenharmony_ci
13461cb0ef41Sopenharmony_ci
13471cb0ef41Sopenharmony_ci#### `save-optional`
13481cb0ef41Sopenharmony_ci
13491cb0ef41Sopenharmony_ci* Default: false
13501cb0ef41Sopenharmony_ci* Type: Boolean
13511cb0ef41Sopenharmony_ci
13521cb0ef41Sopenharmony_ciSave installed packages to a package.json file as `optionalDependencies`.
13531cb0ef41Sopenharmony_ci
13541cb0ef41Sopenharmony_ci
13551cb0ef41Sopenharmony_ci
13561cb0ef41Sopenharmony_ci#### `save-peer`
13571cb0ef41Sopenharmony_ci
13581cb0ef41Sopenharmony_ci* Default: false
13591cb0ef41Sopenharmony_ci* Type: Boolean
13601cb0ef41Sopenharmony_ci
13611cb0ef41Sopenharmony_ciSave installed packages to a package.json file as `peerDependencies`
13621cb0ef41Sopenharmony_ci
13631cb0ef41Sopenharmony_ci
13641cb0ef41Sopenharmony_ci
13651cb0ef41Sopenharmony_ci#### `save-prefix`
13661cb0ef41Sopenharmony_ci
13671cb0ef41Sopenharmony_ci* Default: "^"
13681cb0ef41Sopenharmony_ci* Type: String
13691cb0ef41Sopenharmony_ci
13701cb0ef41Sopenharmony_ciConfigure how versions of packages installed to a package.json file via
13711cb0ef41Sopenharmony_ci`--save` or `--save-dev` get prefixed.
13721cb0ef41Sopenharmony_ci
13731cb0ef41Sopenharmony_ciFor example if a package has version `1.2.3`, by default its version is set
13741cb0ef41Sopenharmony_cito `^1.2.3` which allows minor upgrades for that package, but after `npm
13751cb0ef41Sopenharmony_ciconfig set save-prefix='~'` it would be set to `~1.2.3` which only allows
13761cb0ef41Sopenharmony_cipatch upgrades.
13771cb0ef41Sopenharmony_ci
13781cb0ef41Sopenharmony_ci
13791cb0ef41Sopenharmony_ci
13801cb0ef41Sopenharmony_ci#### `save-prod`
13811cb0ef41Sopenharmony_ci
13821cb0ef41Sopenharmony_ci* Default: false
13831cb0ef41Sopenharmony_ci* Type: Boolean
13841cb0ef41Sopenharmony_ci
13851cb0ef41Sopenharmony_ciSave installed packages into `dependencies` specifically. This is useful if
13861cb0ef41Sopenharmony_cia package already exists in `devDependencies` or `optionalDependencies`, but
13871cb0ef41Sopenharmony_ciyou want to move it to be a non-optional production dependency.
13881cb0ef41Sopenharmony_ci
13891cb0ef41Sopenharmony_ciThis is the default behavior if `--save` is true, and neither `--save-dev`
13901cb0ef41Sopenharmony_cior `--save-optional` are true.
13911cb0ef41Sopenharmony_ci
13921cb0ef41Sopenharmony_ci
13931cb0ef41Sopenharmony_ci
13941cb0ef41Sopenharmony_ci#### `sbom-format`
13951cb0ef41Sopenharmony_ci
13961cb0ef41Sopenharmony_ci* Default: null
13971cb0ef41Sopenharmony_ci* Type: "cyclonedx" or "spdx"
13981cb0ef41Sopenharmony_ci
13991cb0ef41Sopenharmony_ciSBOM format to use when generating SBOMs.
14001cb0ef41Sopenharmony_ci
14011cb0ef41Sopenharmony_ci
14021cb0ef41Sopenharmony_ci
14031cb0ef41Sopenharmony_ci#### `sbom-type`
14041cb0ef41Sopenharmony_ci
14051cb0ef41Sopenharmony_ci* Default: "library"
14061cb0ef41Sopenharmony_ci* Type: "library", "application", or "framework"
14071cb0ef41Sopenharmony_ci
14081cb0ef41Sopenharmony_ciThe type of package described by the generated SBOM. For SPDX, this is the
14091cb0ef41Sopenharmony_civalue for the `primaryPackagePurpose` field. For CycloneDX, this is the
14101cb0ef41Sopenharmony_civalue for the `type` field.
14111cb0ef41Sopenharmony_ci
14121cb0ef41Sopenharmony_ci
14131cb0ef41Sopenharmony_ci
14141cb0ef41Sopenharmony_ci#### `scope`
14151cb0ef41Sopenharmony_ci
14161cb0ef41Sopenharmony_ci* Default: the scope of the current project, if any, or ""
14171cb0ef41Sopenharmony_ci* Type: String
14181cb0ef41Sopenharmony_ci
14191cb0ef41Sopenharmony_ciAssociate an operation with a scope for a scoped registry.
14201cb0ef41Sopenharmony_ci
14211cb0ef41Sopenharmony_ciUseful when logging in to or out of a private registry:
14221cb0ef41Sopenharmony_ci
14231cb0ef41Sopenharmony_ci```
14241cb0ef41Sopenharmony_ci# log in, linking the scope to the custom registry
14251cb0ef41Sopenharmony_cinpm login --scope=@mycorp --registry=https://registry.mycorp.com
14261cb0ef41Sopenharmony_ci
14271cb0ef41Sopenharmony_ci# log out, removing the link and the auth token
14281cb0ef41Sopenharmony_cinpm logout --scope=@mycorp
14291cb0ef41Sopenharmony_ci```
14301cb0ef41Sopenharmony_ci
14311cb0ef41Sopenharmony_ciThis will cause `@mycorp` to be mapped to the registry for future
14321cb0ef41Sopenharmony_ciinstallation of packages specified according to the pattern
14331cb0ef41Sopenharmony_ci`@mycorp/package`.
14341cb0ef41Sopenharmony_ci
14351cb0ef41Sopenharmony_ciThis will also cause `npm init` to create a scoped package.
14361cb0ef41Sopenharmony_ci
14371cb0ef41Sopenharmony_ci```
14381cb0ef41Sopenharmony_ci# accept all defaults, and create a package named "@foo/whatever",
14391cb0ef41Sopenharmony_ci# instead of just named "whatever"
14401cb0ef41Sopenharmony_cinpm init --scope=@foo --yes
14411cb0ef41Sopenharmony_ci```
14421cb0ef41Sopenharmony_ci
14431cb0ef41Sopenharmony_ci
14441cb0ef41Sopenharmony_ci
14451cb0ef41Sopenharmony_ci#### `script-shell`
14461cb0ef41Sopenharmony_ci
14471cb0ef41Sopenharmony_ci* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
14481cb0ef41Sopenharmony_ci* Type: null or String
14491cb0ef41Sopenharmony_ci
14501cb0ef41Sopenharmony_ciThe shell to use for scripts run with the `npm exec`, `npm run` and `npm
14511cb0ef41Sopenharmony_ciinit <package-spec>` commands.
14521cb0ef41Sopenharmony_ci
14531cb0ef41Sopenharmony_ci
14541cb0ef41Sopenharmony_ci
14551cb0ef41Sopenharmony_ci#### `searchexclude`
14561cb0ef41Sopenharmony_ci
14571cb0ef41Sopenharmony_ci* Default: ""
14581cb0ef41Sopenharmony_ci* Type: String
14591cb0ef41Sopenharmony_ci
14601cb0ef41Sopenharmony_ciSpace-separated options that limit the results from search.
14611cb0ef41Sopenharmony_ci
14621cb0ef41Sopenharmony_ci
14631cb0ef41Sopenharmony_ci
14641cb0ef41Sopenharmony_ci#### `searchlimit`
14651cb0ef41Sopenharmony_ci
14661cb0ef41Sopenharmony_ci* Default: 20
14671cb0ef41Sopenharmony_ci* Type: Number
14681cb0ef41Sopenharmony_ci
14691cb0ef41Sopenharmony_ciNumber of items to limit search results to. Will not apply at all to legacy
14701cb0ef41Sopenharmony_cisearches.
14711cb0ef41Sopenharmony_ci
14721cb0ef41Sopenharmony_ci
14731cb0ef41Sopenharmony_ci
14741cb0ef41Sopenharmony_ci#### `searchopts`
14751cb0ef41Sopenharmony_ci
14761cb0ef41Sopenharmony_ci* Default: ""
14771cb0ef41Sopenharmony_ci* Type: String
14781cb0ef41Sopenharmony_ci
14791cb0ef41Sopenharmony_ciSpace-separated options that are always passed to search.
14801cb0ef41Sopenharmony_ci
14811cb0ef41Sopenharmony_ci
14821cb0ef41Sopenharmony_ci
14831cb0ef41Sopenharmony_ci#### `searchstaleness`
14841cb0ef41Sopenharmony_ci
14851cb0ef41Sopenharmony_ci* Default: 900
14861cb0ef41Sopenharmony_ci* Type: Number
14871cb0ef41Sopenharmony_ci
14881cb0ef41Sopenharmony_ciThe age of the cache, in seconds, before another registry request is made if
14891cb0ef41Sopenharmony_ciusing legacy search endpoint.
14901cb0ef41Sopenharmony_ci
14911cb0ef41Sopenharmony_ci
14921cb0ef41Sopenharmony_ci
14931cb0ef41Sopenharmony_ci#### `shell`
14941cb0ef41Sopenharmony_ci
14951cb0ef41Sopenharmony_ci* Default: SHELL environment variable, or "bash" on Posix, or "cmd.exe" on
14961cb0ef41Sopenharmony_ci  Windows
14971cb0ef41Sopenharmony_ci* Type: String
14981cb0ef41Sopenharmony_ci
14991cb0ef41Sopenharmony_ciThe shell to run for the `npm explore` command.
15001cb0ef41Sopenharmony_ci
15011cb0ef41Sopenharmony_ci
15021cb0ef41Sopenharmony_ci
15031cb0ef41Sopenharmony_ci#### `sign-git-commit`
15041cb0ef41Sopenharmony_ci
15051cb0ef41Sopenharmony_ci* Default: false
15061cb0ef41Sopenharmony_ci* Type: Boolean
15071cb0ef41Sopenharmony_ci
15081cb0ef41Sopenharmony_ciIf set to true, then the `npm version` command will commit the new package
15091cb0ef41Sopenharmony_civersion using `-S` to add a signature.
15101cb0ef41Sopenharmony_ci
15111cb0ef41Sopenharmony_ciNote that git requires you to have set up GPG keys in your git configs for
15121cb0ef41Sopenharmony_cithis to work properly.
15131cb0ef41Sopenharmony_ci
15141cb0ef41Sopenharmony_ci
15151cb0ef41Sopenharmony_ci
15161cb0ef41Sopenharmony_ci#### `sign-git-tag`
15171cb0ef41Sopenharmony_ci
15181cb0ef41Sopenharmony_ci* Default: false
15191cb0ef41Sopenharmony_ci* Type: Boolean
15201cb0ef41Sopenharmony_ci
15211cb0ef41Sopenharmony_ciIf set to true, then the `npm version` command will tag the version using
15221cb0ef41Sopenharmony_ci`-s` to add a signature.
15231cb0ef41Sopenharmony_ci
15241cb0ef41Sopenharmony_ciNote that git requires you to have set up GPG keys in your git configs for
15251cb0ef41Sopenharmony_cithis to work properly.
15261cb0ef41Sopenharmony_ci
15271cb0ef41Sopenharmony_ci
15281cb0ef41Sopenharmony_ci
15291cb0ef41Sopenharmony_ci#### `strict-peer-deps`
15301cb0ef41Sopenharmony_ci
15311cb0ef41Sopenharmony_ci* Default: false
15321cb0ef41Sopenharmony_ci* Type: Boolean
15331cb0ef41Sopenharmony_ci
15341cb0ef41Sopenharmony_ciIf set to `true`, and `--legacy-peer-deps` is not set, then _any_
15351cb0ef41Sopenharmony_ciconflicting `peerDependencies` will be treated as an install failure, even
15361cb0ef41Sopenharmony_ciif npm could reasonably guess the appropriate resolution based on non-peer
15371cb0ef41Sopenharmony_cidependency relationships.
15381cb0ef41Sopenharmony_ci
15391cb0ef41Sopenharmony_ciBy default, conflicting `peerDependencies` deep in the dependency graph will
15401cb0ef41Sopenharmony_cibe resolved using the nearest non-peer dependency specification, even if
15411cb0ef41Sopenharmony_cidoing so will result in some packages receiving a peer dependency outside
15421cb0ef41Sopenharmony_cithe range set in their package's `peerDependencies` object.
15431cb0ef41Sopenharmony_ci
15441cb0ef41Sopenharmony_ciWhen such an override is performed, a warning is printed, explaining the
15451cb0ef41Sopenharmony_ciconflict and the packages involved. If `--strict-peer-deps` is set, then
15461cb0ef41Sopenharmony_cithis warning is treated as a failure.
15471cb0ef41Sopenharmony_ci
15481cb0ef41Sopenharmony_ci
15491cb0ef41Sopenharmony_ci
15501cb0ef41Sopenharmony_ci#### `strict-ssl`
15511cb0ef41Sopenharmony_ci
15521cb0ef41Sopenharmony_ci* Default: true
15531cb0ef41Sopenharmony_ci* Type: Boolean
15541cb0ef41Sopenharmony_ci
15551cb0ef41Sopenharmony_ciWhether or not to do SSL key validation when making requests to the registry
15561cb0ef41Sopenharmony_civia https.
15571cb0ef41Sopenharmony_ci
15581cb0ef41Sopenharmony_ciSee also the `ca` config.
15591cb0ef41Sopenharmony_ci
15601cb0ef41Sopenharmony_ci
15611cb0ef41Sopenharmony_ci
15621cb0ef41Sopenharmony_ci#### `tag`
15631cb0ef41Sopenharmony_ci
15641cb0ef41Sopenharmony_ci* Default: "latest"
15651cb0ef41Sopenharmony_ci* Type: String
15661cb0ef41Sopenharmony_ci
15671cb0ef41Sopenharmony_ciIf you ask npm to install a package and don't tell it a specific version,
15681cb0ef41Sopenharmony_cithen it will install the specified tag.
15691cb0ef41Sopenharmony_ci
15701cb0ef41Sopenharmony_ciAlso the tag that is added to the package@version specified by the `npm tag`
15711cb0ef41Sopenharmony_cicommand, if no explicit tag is given.
15721cb0ef41Sopenharmony_ci
15731cb0ef41Sopenharmony_ciWhen used by the `npm diff` command, this is the tag used to fetch the
15741cb0ef41Sopenharmony_citarball that will be compared with the local files by default.
15751cb0ef41Sopenharmony_ci
15761cb0ef41Sopenharmony_ci
15771cb0ef41Sopenharmony_ci
15781cb0ef41Sopenharmony_ci#### `tag-version-prefix`
15791cb0ef41Sopenharmony_ci
15801cb0ef41Sopenharmony_ci* Default: "v"
15811cb0ef41Sopenharmony_ci* Type: String
15821cb0ef41Sopenharmony_ci
15831cb0ef41Sopenharmony_ciIf set, alters the prefix used when tagging a new version when performing a
15841cb0ef41Sopenharmony_civersion increment using `npm version`. To remove the prefix altogether, set
15851cb0ef41Sopenharmony_ciit to the empty string: `""`.
15861cb0ef41Sopenharmony_ci
15871cb0ef41Sopenharmony_ciBecause other tools may rely on the convention that npm version tags look
15881cb0ef41Sopenharmony_cilike `v1.0.0`, _only use this property if it is absolutely necessary_. In
15891cb0ef41Sopenharmony_ciparticular, use care when overriding this setting for public packages.
15901cb0ef41Sopenharmony_ci
15911cb0ef41Sopenharmony_ci
15921cb0ef41Sopenharmony_ci
15931cb0ef41Sopenharmony_ci#### `timing`
15941cb0ef41Sopenharmony_ci
15951cb0ef41Sopenharmony_ci* Default: false
15961cb0ef41Sopenharmony_ci* Type: Boolean
15971cb0ef41Sopenharmony_ci
15981cb0ef41Sopenharmony_ciIf true, writes timing information to a process specific json file in the
15991cb0ef41Sopenharmony_cicache or `logs-dir`. The file name ends with `-timing.json`.
16001cb0ef41Sopenharmony_ci
16011cb0ef41Sopenharmony_ciYou can quickly view it with this [json](https://npm.im/json) command line:
16021cb0ef41Sopenharmony_ci`cat ~/.npm/_logs/*-timing.json | npm exec -- json -g`.
16031cb0ef41Sopenharmony_ci
16041cb0ef41Sopenharmony_ciTiming information will also be reported in the terminal. To suppress this
16051cb0ef41Sopenharmony_ciwhile still writing the timing file, use `--silent`.
16061cb0ef41Sopenharmony_ci
16071cb0ef41Sopenharmony_ci
16081cb0ef41Sopenharmony_ci
16091cb0ef41Sopenharmony_ci#### `umask`
16101cb0ef41Sopenharmony_ci
16111cb0ef41Sopenharmony_ci* Default: 0
16121cb0ef41Sopenharmony_ci* Type: Octal numeric string in range 0000..0777 (0..511)
16131cb0ef41Sopenharmony_ci
16141cb0ef41Sopenharmony_ciThe "umask" value to use when setting the file creation mode on files and
16151cb0ef41Sopenharmony_cifolders.
16161cb0ef41Sopenharmony_ci
16171cb0ef41Sopenharmony_ciFolders and executables are given a mode which is `0o777` masked against
16181cb0ef41Sopenharmony_cithis value. Other files are given a mode which is `0o666` masked against
16191cb0ef41Sopenharmony_cithis value.
16201cb0ef41Sopenharmony_ci
16211cb0ef41Sopenharmony_ciNote that the underlying system will _also_ apply its own umask value to
16221cb0ef41Sopenharmony_cifiles and folders that are created, and npm does not circumvent this, but
16231cb0ef41Sopenharmony_cirather adds the `--umask` config to it.
16241cb0ef41Sopenharmony_ci
16251cb0ef41Sopenharmony_ciThus, the effective default umask value on most POSIX systems is 0o22,
16261cb0ef41Sopenharmony_cimeaning that folders and executables are created with a mode of 0o755 and
16271cb0ef41Sopenharmony_ciother files are created with a mode of 0o644.
16281cb0ef41Sopenharmony_ci
16291cb0ef41Sopenharmony_ci
16301cb0ef41Sopenharmony_ci
16311cb0ef41Sopenharmony_ci#### `unicode`
16321cb0ef41Sopenharmony_ci
16331cb0ef41Sopenharmony_ci* Default: false on windows, true on mac/unix systems with a unicode locale,
16341cb0ef41Sopenharmony_ci  as defined by the `LC_ALL`, `LC_CTYPE`, or `LANG` environment variables.
16351cb0ef41Sopenharmony_ci* Type: Boolean
16361cb0ef41Sopenharmony_ci
16371cb0ef41Sopenharmony_ciWhen set to true, npm uses unicode characters in the tree output. When
16381cb0ef41Sopenharmony_cifalse, it uses ascii characters instead of unicode glyphs.
16391cb0ef41Sopenharmony_ci
16401cb0ef41Sopenharmony_ci
16411cb0ef41Sopenharmony_ci
16421cb0ef41Sopenharmony_ci#### `update-notifier`
16431cb0ef41Sopenharmony_ci
16441cb0ef41Sopenharmony_ci* Default: true
16451cb0ef41Sopenharmony_ci* Type: Boolean
16461cb0ef41Sopenharmony_ci
16471cb0ef41Sopenharmony_ciSet to false to suppress the update notification when using an older version
16481cb0ef41Sopenharmony_ciof npm than the latest.
16491cb0ef41Sopenharmony_ci
16501cb0ef41Sopenharmony_ci
16511cb0ef41Sopenharmony_ci
16521cb0ef41Sopenharmony_ci#### `usage`
16531cb0ef41Sopenharmony_ci
16541cb0ef41Sopenharmony_ci* Default: false
16551cb0ef41Sopenharmony_ci* Type: Boolean
16561cb0ef41Sopenharmony_ci
16571cb0ef41Sopenharmony_ciShow short usage output about the command specified.
16581cb0ef41Sopenharmony_ci
16591cb0ef41Sopenharmony_ci
16601cb0ef41Sopenharmony_ci
16611cb0ef41Sopenharmony_ci#### `user-agent`
16621cb0ef41Sopenharmony_ci
16631cb0ef41Sopenharmony_ci* Default: "npm/{npm-version} node/{node-version} {platform} {arch}
16641cb0ef41Sopenharmony_ci  workspaces/{workspaces} {ci}"
16651cb0ef41Sopenharmony_ci* Type: String
16661cb0ef41Sopenharmony_ci
16671cb0ef41Sopenharmony_ciSets the User-Agent request header. The following fields are replaced with
16681cb0ef41Sopenharmony_citheir actual counterparts:
16691cb0ef41Sopenharmony_ci
16701cb0ef41Sopenharmony_ci* `{npm-version}` - The npm version in use
16711cb0ef41Sopenharmony_ci* `{node-version}` - The Node.js version in use
16721cb0ef41Sopenharmony_ci* `{platform}` - The value of `process.platform`
16731cb0ef41Sopenharmony_ci* `{arch}` - The value of `process.arch`
16741cb0ef41Sopenharmony_ci* `{workspaces}` - Set to `true` if the `workspaces` or `workspace` options
16751cb0ef41Sopenharmony_ci  are set.
16761cb0ef41Sopenharmony_ci* `{ci}` - The value of the `ci-name` config, if set, prefixed with `ci/`, or
16771cb0ef41Sopenharmony_ci  an empty string if `ci-name` is empty.
16781cb0ef41Sopenharmony_ci
16791cb0ef41Sopenharmony_ci
16801cb0ef41Sopenharmony_ci
16811cb0ef41Sopenharmony_ci#### `userconfig`
16821cb0ef41Sopenharmony_ci
16831cb0ef41Sopenharmony_ci* Default: "~/.npmrc"
16841cb0ef41Sopenharmony_ci* Type: Path
16851cb0ef41Sopenharmony_ci
16861cb0ef41Sopenharmony_ciThe location of user-level configuration settings.
16871cb0ef41Sopenharmony_ci
16881cb0ef41Sopenharmony_ciThis may be overridden by the `npm_config_userconfig` environment variable
16891cb0ef41Sopenharmony_cior the `--userconfig` command line option, but may _not_ be overridden by
16901cb0ef41Sopenharmony_cisettings in the `globalconfig` file.
16911cb0ef41Sopenharmony_ci
16921cb0ef41Sopenharmony_ci
16931cb0ef41Sopenharmony_ci
16941cb0ef41Sopenharmony_ci#### `version`
16951cb0ef41Sopenharmony_ci
16961cb0ef41Sopenharmony_ci* Default: false
16971cb0ef41Sopenharmony_ci* Type: Boolean
16981cb0ef41Sopenharmony_ci
16991cb0ef41Sopenharmony_ciIf true, output the npm version and exit successfully.
17001cb0ef41Sopenharmony_ci
17011cb0ef41Sopenharmony_ciOnly relevant when specified explicitly on the command line.
17021cb0ef41Sopenharmony_ci
17031cb0ef41Sopenharmony_ci
17041cb0ef41Sopenharmony_ci
17051cb0ef41Sopenharmony_ci#### `versions`
17061cb0ef41Sopenharmony_ci
17071cb0ef41Sopenharmony_ci* Default: false
17081cb0ef41Sopenharmony_ci* Type: Boolean
17091cb0ef41Sopenharmony_ci
17101cb0ef41Sopenharmony_ciIf true, output the npm version as well as node's `process.versions` map and
17111cb0ef41Sopenharmony_cithe version in the current working directory's `package.json` file if one
17121cb0ef41Sopenharmony_ciexists, and exit successfully.
17131cb0ef41Sopenharmony_ci
17141cb0ef41Sopenharmony_ciOnly relevant when specified explicitly on the command line.
17151cb0ef41Sopenharmony_ci
17161cb0ef41Sopenharmony_ci
17171cb0ef41Sopenharmony_ci
17181cb0ef41Sopenharmony_ci#### `viewer`
17191cb0ef41Sopenharmony_ci
17201cb0ef41Sopenharmony_ci* Default: "man" on Posix, "browser" on Windows
17211cb0ef41Sopenharmony_ci* Type: String
17221cb0ef41Sopenharmony_ci
17231cb0ef41Sopenharmony_ciThe program to use to view help content.
17241cb0ef41Sopenharmony_ci
17251cb0ef41Sopenharmony_ciSet to `"browser"` to view html help content in the default web browser.
17261cb0ef41Sopenharmony_ci
17271cb0ef41Sopenharmony_ci
17281cb0ef41Sopenharmony_ci
17291cb0ef41Sopenharmony_ci#### `which`
17301cb0ef41Sopenharmony_ci
17311cb0ef41Sopenharmony_ci* Default: null
17321cb0ef41Sopenharmony_ci* Type: null or Number
17331cb0ef41Sopenharmony_ci
17341cb0ef41Sopenharmony_ciIf there are multiple funding sources, which 1-indexed source URL to open.
17351cb0ef41Sopenharmony_ci
17361cb0ef41Sopenharmony_ci
17371cb0ef41Sopenharmony_ci
17381cb0ef41Sopenharmony_ci#### `workspace`
17391cb0ef41Sopenharmony_ci
17401cb0ef41Sopenharmony_ci* Default:
17411cb0ef41Sopenharmony_ci* Type: String (can be set multiple times)
17421cb0ef41Sopenharmony_ci
17431cb0ef41Sopenharmony_ciEnable running a command in the context of the configured workspaces of the
17441cb0ef41Sopenharmony_cicurrent project while filtering by running only the workspaces defined by
17451cb0ef41Sopenharmony_cithis configuration option.
17461cb0ef41Sopenharmony_ci
17471cb0ef41Sopenharmony_ciValid values for the `workspace` config are either:
17481cb0ef41Sopenharmony_ci
17491cb0ef41Sopenharmony_ci* Workspace names
17501cb0ef41Sopenharmony_ci* Path to a workspace directory
17511cb0ef41Sopenharmony_ci* Path to a parent workspace directory (will result in selecting all
17521cb0ef41Sopenharmony_ci  workspaces within that folder)
17531cb0ef41Sopenharmony_ci
17541cb0ef41Sopenharmony_ciWhen set for the `npm init` command, this may be set to the folder of a
17551cb0ef41Sopenharmony_ciworkspace which does not yet exist, to create the folder and set it up as a
17561cb0ef41Sopenharmony_cibrand new workspace within the project.
17571cb0ef41Sopenharmony_ci
17581cb0ef41Sopenharmony_ciThis value is not exported to the environment for child processes.
17591cb0ef41Sopenharmony_ci
17601cb0ef41Sopenharmony_ci#### `workspaces`
17611cb0ef41Sopenharmony_ci
17621cb0ef41Sopenharmony_ci* Default: null
17631cb0ef41Sopenharmony_ci* Type: null or Boolean
17641cb0ef41Sopenharmony_ci
17651cb0ef41Sopenharmony_ciSet to true to run the command in the context of **all** configured
17661cb0ef41Sopenharmony_ciworkspaces.
17671cb0ef41Sopenharmony_ci
17681cb0ef41Sopenharmony_ciExplicitly setting this to false will cause commands like `install` to
17691cb0ef41Sopenharmony_ciignore workspaces altogether. When not set explicitly:
17701cb0ef41Sopenharmony_ci
17711cb0ef41Sopenharmony_ci- Commands that operate on the `node_modules` tree (install, update, etc.)
17721cb0ef41Sopenharmony_ciwill link workspaces into the `node_modules` folder. - Commands that do
17731cb0ef41Sopenharmony_ciother things (test, exec, publish, etc.) will operate on the root project,
17741cb0ef41Sopenharmony_ci_unless_ one or more workspaces are specified in the `workspace` config.
17751cb0ef41Sopenharmony_ci
17761cb0ef41Sopenharmony_ciThis value is not exported to the environment for child processes.
17771cb0ef41Sopenharmony_ci
17781cb0ef41Sopenharmony_ci#### `workspaces-update`
17791cb0ef41Sopenharmony_ci
17801cb0ef41Sopenharmony_ci* Default: true
17811cb0ef41Sopenharmony_ci* Type: Boolean
17821cb0ef41Sopenharmony_ci
17831cb0ef41Sopenharmony_ciIf set to true, the npm cli will run an update after operations that may
17841cb0ef41Sopenharmony_cipossibly change the workspaces installed to the `node_modules` folder.
17851cb0ef41Sopenharmony_ci
17861cb0ef41Sopenharmony_ci
17871cb0ef41Sopenharmony_ci
17881cb0ef41Sopenharmony_ci#### `yes`
17891cb0ef41Sopenharmony_ci
17901cb0ef41Sopenharmony_ci* Default: null
17911cb0ef41Sopenharmony_ci* Type: null or Boolean
17921cb0ef41Sopenharmony_ci
17931cb0ef41Sopenharmony_ciAutomatically answer "yes" to any prompts that npm might print on the
17941cb0ef41Sopenharmony_cicommand line.
17951cb0ef41Sopenharmony_ci
17961cb0ef41Sopenharmony_ci
17971cb0ef41Sopenharmony_ci
17981cb0ef41Sopenharmony_ci#### `also`
17991cb0ef41Sopenharmony_ci
18001cb0ef41Sopenharmony_ci* Default: null
18011cb0ef41Sopenharmony_ci* Type: null, "dev", or "development"
18021cb0ef41Sopenharmony_ci* DEPRECATED: Please use --include=dev instead.
18031cb0ef41Sopenharmony_ci
18041cb0ef41Sopenharmony_ciWhen set to `dev` or `development`, this is an alias for `--include=dev`.
18051cb0ef41Sopenharmony_ci
18061cb0ef41Sopenharmony_ci
18071cb0ef41Sopenharmony_ci
18081cb0ef41Sopenharmony_ci#### `cache-max`
18091cb0ef41Sopenharmony_ci
18101cb0ef41Sopenharmony_ci* Default: Infinity
18111cb0ef41Sopenharmony_ci* Type: Number
18121cb0ef41Sopenharmony_ci* DEPRECATED: This option has been deprecated in favor of `--prefer-online`
18131cb0ef41Sopenharmony_ci
18141cb0ef41Sopenharmony_ci`--cache-max=0` is an alias for `--prefer-online`
18151cb0ef41Sopenharmony_ci
18161cb0ef41Sopenharmony_ci
18171cb0ef41Sopenharmony_ci
18181cb0ef41Sopenharmony_ci#### `cache-min`
18191cb0ef41Sopenharmony_ci
18201cb0ef41Sopenharmony_ci* Default: 0
18211cb0ef41Sopenharmony_ci* Type: Number
18221cb0ef41Sopenharmony_ci* DEPRECATED: This option has been deprecated in favor of `--prefer-offline`.
18231cb0ef41Sopenharmony_ci
18241cb0ef41Sopenharmony_ci`--cache-min=9999 (or bigger)` is an alias for `--prefer-offline`.
18251cb0ef41Sopenharmony_ci
18261cb0ef41Sopenharmony_ci
18271cb0ef41Sopenharmony_ci
18281cb0ef41Sopenharmony_ci#### `cert`
18291cb0ef41Sopenharmony_ci
18301cb0ef41Sopenharmony_ci* Default: null
18311cb0ef41Sopenharmony_ci* Type: null or String
18321cb0ef41Sopenharmony_ci* DEPRECATED: `key` and `cert` are no longer used for most registry
18331cb0ef41Sopenharmony_ci  operations. Use registry scoped `keyfile` and `certfile` instead. Example:
18341cb0ef41Sopenharmony_ci  //other-registry.tld/:keyfile=/path/to/key.pem
18351cb0ef41Sopenharmony_ci  //other-registry.tld/:certfile=/path/to/cert.crt
18361cb0ef41Sopenharmony_ci
18371cb0ef41Sopenharmony_ciA client certificate to pass when accessing the registry. Values should be
18381cb0ef41Sopenharmony_ciin PEM format (Windows calls it "Base-64 encoded X.509 (.CER)") with
18391cb0ef41Sopenharmony_cinewlines replaced by the string "\n". For example:
18401cb0ef41Sopenharmony_ci
18411cb0ef41Sopenharmony_ci```ini
18421cb0ef41Sopenharmony_cicert="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----"
18431cb0ef41Sopenharmony_ci```
18441cb0ef41Sopenharmony_ci
18451cb0ef41Sopenharmony_ciIt is _not_ the path to a certificate file, though you can set a
18461cb0ef41Sopenharmony_ciregistry-scoped "certfile" path like
18471cb0ef41Sopenharmony_ci"//other-registry.tld/:certfile=/path/to/cert.pem".
18481cb0ef41Sopenharmony_ci
18491cb0ef41Sopenharmony_ci
18501cb0ef41Sopenharmony_ci
18511cb0ef41Sopenharmony_ci#### `dev`
18521cb0ef41Sopenharmony_ci
18531cb0ef41Sopenharmony_ci* Default: false
18541cb0ef41Sopenharmony_ci* Type: Boolean
18551cb0ef41Sopenharmony_ci* DEPRECATED: Please use --include=dev instead.
18561cb0ef41Sopenharmony_ci
18571cb0ef41Sopenharmony_ciAlias for `--include=dev`.
18581cb0ef41Sopenharmony_ci
18591cb0ef41Sopenharmony_ci
18601cb0ef41Sopenharmony_ci
18611cb0ef41Sopenharmony_ci#### `global-style`
18621cb0ef41Sopenharmony_ci
18631cb0ef41Sopenharmony_ci* Default: false
18641cb0ef41Sopenharmony_ci* Type: Boolean
18651cb0ef41Sopenharmony_ci* DEPRECATED: This option has been deprecated in favor of
18661cb0ef41Sopenharmony_ci  `--install-strategy=shallow`
18671cb0ef41Sopenharmony_ci
18681cb0ef41Sopenharmony_ciOnly install direct dependencies in the top level `node_modules`, but hoist
18691cb0ef41Sopenharmony_cion deeper dependencies. Sets `--install-strategy=shallow`.
18701cb0ef41Sopenharmony_ci
18711cb0ef41Sopenharmony_ci
18721cb0ef41Sopenharmony_ci
18731cb0ef41Sopenharmony_ci#### `init.author.email`
18741cb0ef41Sopenharmony_ci
18751cb0ef41Sopenharmony_ci* Default: ""
18761cb0ef41Sopenharmony_ci* Type: String
18771cb0ef41Sopenharmony_ci* DEPRECATED: Use `--init-author-email` instead.
18781cb0ef41Sopenharmony_ci
18791cb0ef41Sopenharmony_ciAlias for `--init-author-email`
18801cb0ef41Sopenharmony_ci
18811cb0ef41Sopenharmony_ci
18821cb0ef41Sopenharmony_ci
18831cb0ef41Sopenharmony_ci#### `init.author.name`
18841cb0ef41Sopenharmony_ci
18851cb0ef41Sopenharmony_ci* Default: ""
18861cb0ef41Sopenharmony_ci* Type: String
18871cb0ef41Sopenharmony_ci* DEPRECATED: Use `--init-author-name` instead.
18881cb0ef41Sopenharmony_ci
18891cb0ef41Sopenharmony_ciAlias for `--init-author-name`
18901cb0ef41Sopenharmony_ci
18911cb0ef41Sopenharmony_ci
18921cb0ef41Sopenharmony_ci
18931cb0ef41Sopenharmony_ci#### `init.author.url`
18941cb0ef41Sopenharmony_ci
18951cb0ef41Sopenharmony_ci* Default: ""
18961cb0ef41Sopenharmony_ci* Type: "" or URL
18971cb0ef41Sopenharmony_ci* DEPRECATED: Use `--init-author-url` instead.
18981cb0ef41Sopenharmony_ci
18991cb0ef41Sopenharmony_ciAlias for `--init-author-url`
19001cb0ef41Sopenharmony_ci
19011cb0ef41Sopenharmony_ci
19021cb0ef41Sopenharmony_ci
19031cb0ef41Sopenharmony_ci#### `init.license`
19041cb0ef41Sopenharmony_ci
19051cb0ef41Sopenharmony_ci* Default: "ISC"
19061cb0ef41Sopenharmony_ci* Type: String
19071cb0ef41Sopenharmony_ci* DEPRECATED: Use `--init-license` instead.
19081cb0ef41Sopenharmony_ci
19091cb0ef41Sopenharmony_ciAlias for `--init-license`
19101cb0ef41Sopenharmony_ci
19111cb0ef41Sopenharmony_ci
19121cb0ef41Sopenharmony_ci
19131cb0ef41Sopenharmony_ci#### `init.module`
19141cb0ef41Sopenharmony_ci
19151cb0ef41Sopenharmony_ci* Default: "~/.npm-init.js"
19161cb0ef41Sopenharmony_ci* Type: Path
19171cb0ef41Sopenharmony_ci* DEPRECATED: Use `--init-module` instead.
19181cb0ef41Sopenharmony_ci
19191cb0ef41Sopenharmony_ciAlias for `--init-module`
19201cb0ef41Sopenharmony_ci
19211cb0ef41Sopenharmony_ci
19221cb0ef41Sopenharmony_ci
19231cb0ef41Sopenharmony_ci#### `init.version`
19241cb0ef41Sopenharmony_ci
19251cb0ef41Sopenharmony_ci* Default: "1.0.0"
19261cb0ef41Sopenharmony_ci* Type: SemVer string
19271cb0ef41Sopenharmony_ci* DEPRECATED: Use `--init-version` instead.
19281cb0ef41Sopenharmony_ci
19291cb0ef41Sopenharmony_ciAlias for `--init-version`
19301cb0ef41Sopenharmony_ci
19311cb0ef41Sopenharmony_ci
19321cb0ef41Sopenharmony_ci
19331cb0ef41Sopenharmony_ci#### `key`
19341cb0ef41Sopenharmony_ci
19351cb0ef41Sopenharmony_ci* Default: null
19361cb0ef41Sopenharmony_ci* Type: null or String
19371cb0ef41Sopenharmony_ci* DEPRECATED: `key` and `cert` are no longer used for most registry
19381cb0ef41Sopenharmony_ci  operations. Use registry scoped `keyfile` and `certfile` instead. Example:
19391cb0ef41Sopenharmony_ci  //other-registry.tld/:keyfile=/path/to/key.pem
19401cb0ef41Sopenharmony_ci  //other-registry.tld/:certfile=/path/to/cert.crt
19411cb0ef41Sopenharmony_ci
19421cb0ef41Sopenharmony_ciA client key to pass when accessing the registry. Values should be in PEM
19431cb0ef41Sopenharmony_ciformat with newlines replaced by the string "\n". For example:
19441cb0ef41Sopenharmony_ci
19451cb0ef41Sopenharmony_ci```ini
19461cb0ef41Sopenharmony_cikey="-----BEGIN PRIVATE KEY-----\nXXXX\nXXXX\n-----END PRIVATE KEY-----"
19471cb0ef41Sopenharmony_ci```
19481cb0ef41Sopenharmony_ci
19491cb0ef41Sopenharmony_ciIt is _not_ the path to a key file, though you can set a registry-scoped
19501cb0ef41Sopenharmony_ci"keyfile" path like "//other-registry.tld/:keyfile=/path/to/key.pem".
19511cb0ef41Sopenharmony_ci
19521cb0ef41Sopenharmony_ci
19531cb0ef41Sopenharmony_ci
19541cb0ef41Sopenharmony_ci#### `legacy-bundling`
19551cb0ef41Sopenharmony_ci
19561cb0ef41Sopenharmony_ci* Default: false
19571cb0ef41Sopenharmony_ci* Type: Boolean
19581cb0ef41Sopenharmony_ci* DEPRECATED: This option has been deprecated in favor of
19591cb0ef41Sopenharmony_ci  `--install-strategy=nested`
19601cb0ef41Sopenharmony_ci
19611cb0ef41Sopenharmony_ciInstead of hoisting package installs in `node_modules`, install packages in
19621cb0ef41Sopenharmony_cithe same manner that they are depended on. This may cause very deep
19631cb0ef41Sopenharmony_cidirectory structures and duplicate package installs as there is no
19641cb0ef41Sopenharmony_cide-duplicating. Sets `--install-strategy=nested`.
19651cb0ef41Sopenharmony_ci
19661cb0ef41Sopenharmony_ci
19671cb0ef41Sopenharmony_ci
19681cb0ef41Sopenharmony_ci#### `only`
19691cb0ef41Sopenharmony_ci
19701cb0ef41Sopenharmony_ci* Default: null
19711cb0ef41Sopenharmony_ci* Type: null, "prod", or "production"
19721cb0ef41Sopenharmony_ci* DEPRECATED: Use `--omit=dev` to omit dev dependencies from the install.
19731cb0ef41Sopenharmony_ci
19741cb0ef41Sopenharmony_ciWhen set to `prod` or `production`, this is an alias for `--omit=dev`.
19751cb0ef41Sopenharmony_ci
19761cb0ef41Sopenharmony_ci
19771cb0ef41Sopenharmony_ci
19781cb0ef41Sopenharmony_ci#### `optional`
19791cb0ef41Sopenharmony_ci
19801cb0ef41Sopenharmony_ci* Default: null
19811cb0ef41Sopenharmony_ci* Type: null or Boolean
19821cb0ef41Sopenharmony_ci* DEPRECATED: Use `--omit=optional` to exclude optional dependencies, or
19831cb0ef41Sopenharmony_ci  `--include=optional` to include them.
19841cb0ef41Sopenharmony_ci
19851cb0ef41Sopenharmony_ciDefault value does install optional deps unless otherwise omitted.
19861cb0ef41Sopenharmony_ci
19871cb0ef41Sopenharmony_ciAlias for --include=optional or --omit=optional
19881cb0ef41Sopenharmony_ci
19891cb0ef41Sopenharmony_ci
19901cb0ef41Sopenharmony_ci
19911cb0ef41Sopenharmony_ci#### `production`
19921cb0ef41Sopenharmony_ci
19931cb0ef41Sopenharmony_ci* Default: null
19941cb0ef41Sopenharmony_ci* Type: null or Boolean
19951cb0ef41Sopenharmony_ci* DEPRECATED: Use `--omit=dev` instead.
19961cb0ef41Sopenharmony_ci
19971cb0ef41Sopenharmony_ciAlias for `--omit=dev`
19981cb0ef41Sopenharmony_ci
19991cb0ef41Sopenharmony_ci
20001cb0ef41Sopenharmony_ci
20011cb0ef41Sopenharmony_ci#### `shrinkwrap`
20021cb0ef41Sopenharmony_ci
20031cb0ef41Sopenharmony_ci* Default: true
20041cb0ef41Sopenharmony_ci* Type: Boolean
20051cb0ef41Sopenharmony_ci* DEPRECATED: Use the --package-lock setting instead.
20061cb0ef41Sopenharmony_ci
20071cb0ef41Sopenharmony_ciAlias for --package-lock
20081cb0ef41Sopenharmony_ci
20091cb0ef41Sopenharmony_ci
20101cb0ef41Sopenharmony_ci
20111cb0ef41Sopenharmony_ci### See also
20121cb0ef41Sopenharmony_ci
20131cb0ef41Sopenharmony_ci* [npm config](/commands/npm-config)
20141cb0ef41Sopenharmony_ci* [npmrc](/configuring-npm/npmrc)
20151cb0ef41Sopenharmony_ci* [npm scripts](/using-npm/scripts)
20161cb0ef41Sopenharmony_ci* [npm folders](/configuring-npm/folders)
20171cb0ef41Sopenharmony_ci* [npm](/commands/npm)
2018