1--- 2title: config 3section: 7 4description: More than you probably want to know about npm configuration 5--- 6 7### Description 8 9This article details npm configuration in general. To learn about the `config` command, 10see [`npm config`](/commands/npm-config). 11 12npm gets its configuration values from the following sources, sorted by priority: 13 14#### Command Line Flags 15 16Putting `--foo bar` on the command line sets the `foo` configuration 17parameter to `"bar"`. A `--` argument tells the cli parser to stop 18reading flags. Using `--flag` without specifying any value will set 19the value to `true`. 20 21Example: `--flag1 --flag2` will set both configuration parameters 22to `true`, while `--flag1 --flag2 bar` will set `flag1` to `true`, 23and `flag2` to `bar`. Finally, `--flag1 --flag2 -- bar` will set 24both configuration parameters to `true`, and the `bar` is taken 25as a command argument. 26 27#### Environment Variables 28 29Any environment variables that start with `npm_config_` will be 30interpreted as a configuration parameter. For example, putting 31`npm_config_foo=bar` in your environment will set the `foo` 32configuration parameter to `bar`. Any environment configurations that 33are not given a value will be given the value of `true`. Config 34values are case-insensitive, so `NPM_CONFIG_FOO=bar` will work the 35same. However, please note that inside [`scripts`](/using-npm/scripts) 36npm will set its own environment variables and Node will prefer 37those lowercase versions over any uppercase ones that you might set. 38For details see [this issue](https://github.com/npm/npm/issues/14528). 39 40Notice that you need to use underscores instead of dashes, so `--allow-same-version` 41would become `npm_config_allow_same_version=true`. 42 43#### npmrc Files 44 45The four relevant files are: 46 47* per-project configuration file (`/path/to/my/project/.npmrc`) 48* per-user configuration file (defaults to `$HOME/.npmrc`; configurable via CLI 49 option `--userconfig` or environment variable `$NPM_CONFIG_USERCONFIG`) 50* global configuration file (defaults to `$PREFIX/etc/npmrc`; configurable via 51 CLI option `--globalconfig` or environment variable `$NPM_CONFIG_GLOBALCONFIG`) 52* npm's built-in configuration file (`/path/to/npm/npmrc`) 53 54See [npmrc](/configuring-npm/npmrc) for more details. 55 56#### Default Configs 57 58Run `npm config ls -l` to see a set of configuration parameters that are 59internal to npm, and are defaults if nothing else is specified. 60 61### Shorthands and Other CLI Niceties 62 63The following shorthands are parsed on the command-line: 64 65* `-a`: `--all` 66* `--enjoy-by`: `--before` 67* `-c`: `--call` 68* `--desc`: `--description` 69* `-f`: `--force` 70* `-g`: `--global` 71* `--iwr`: `--include-workspace-root` 72* `-L`: `--location` 73* `-d`: `--loglevel info` 74* `-s`: `--loglevel silent` 75* `--silent`: `--loglevel silent` 76* `--ddd`: `--loglevel silly` 77* `--dd`: `--loglevel verbose` 78* `--verbose`: `--loglevel verbose` 79* `-q`: `--loglevel warn` 80* `--quiet`: `--loglevel warn` 81* `-l`: `--long` 82* `-m`: `--message` 83* `--local`: `--no-global` 84* `-n`: `--no-yes` 85* `--no`: `--no-yes` 86* `-p`: `--parseable` 87* `--porcelain`: `--parseable` 88* `-C`: `--prefix` 89* `--readonly`: `--read-only` 90* `--reg`: `--registry` 91* `-S`: `--save` 92* `-B`: `--save-bundle` 93* `-D`: `--save-dev` 94* `-E`: `--save-exact` 95* `-O`: `--save-optional` 96* `-P`: `--save-prod` 97* `-?`: `--usage` 98* `-h`: `--usage` 99* `-H`: `--usage` 100* `--help`: `--usage` 101* `-v`: `--version` 102* `-w`: `--workspace` 103* `--ws`: `--workspaces` 104* `-y`: `--yes` 105 106If the specified configuration param resolves unambiguously to a known 107configuration parameter, then it is expanded to that configuration 108parameter. For example: 109 110```bash 111npm ls --par 112# same as: 113npm ls --parseable 114``` 115 116If multiple single-character shorthands are strung together, and the 117resulting combination is unambiguously not some other configuration 118param, then it is expanded to its various component pieces. For 119example: 120 121```bash 122npm ls -gpld 123# same as: 124npm ls --global --parseable --long --loglevel info 125``` 126 127### Config Settings 128 129#### `_auth` 130 131* Default: null 132* Type: null or String 133 134A basic-auth string to use when authenticating against the npm registry. 135This will ONLY be used to authenticate against the npm registry. For other 136registries you will need to scope it like "//other-registry.tld/:_auth" 137 138Warning: This should generally not be set via a command-line option. It is 139safer to use a registry-provided authentication bearer token stored in the 140~/.npmrc file by running `npm login`. 141 142 143 144#### `access` 145 146* Default: 'public' for new packages, existing packages it will not change the 147 current level 148* Type: null, "restricted", or "public" 149 150If you do not want your scoped package to be publicly viewable (and 151installable) set `--access=restricted`. 152 153Unscoped packages can not be set to `restricted`. 154 155Note: This defaults to not changing the current access level for existing 156packages. Specifying a value of `restricted` or `public` during publish will 157change the access for an existing package the same way that `npm access set 158status` would. 159 160 161 162#### `all` 163 164* Default: false 165* Type: Boolean 166 167When running `npm outdated` and `npm ls`, setting `--all` will show all 168outdated or installed packages, rather than only those directly depended 169upon by the current project. 170 171 172 173#### `allow-same-version` 174 175* Default: false 176* Type: Boolean 177 178Prevents throwing an error when `npm version` is used to set the new version 179to the same value as the current version. 180 181 182 183#### `audit` 184 185* Default: true 186* Type: Boolean 187 188When "true" submit audit reports alongside the current npm command to the 189default registry and all registries configured for scopes. See the 190documentation for [`npm audit`](/commands/npm-audit) for details on what is 191submitted. 192 193 194 195#### `audit-level` 196 197* Default: null 198* Type: null, "info", "low", "moderate", "high", "critical", or "none" 199 200The minimum level of vulnerability for `npm audit` to exit with a non-zero 201exit code. 202 203 204 205#### `auth-type` 206 207* Default: "web" 208* Type: "legacy" or "web" 209 210What authentication strategy to use with `login`. Note that if an `otp` 211config is given, this value will always be set to `legacy`. 212 213 214 215#### `before` 216 217* Default: null 218* Type: null or Date 219 220If passed to `npm install`, will rebuild the npm tree such that only 221versions that were available **on or before** the `--before` time get 222installed. If there's no versions available for the current set of direct 223dependencies, the command will error. 224 225If the requested version is a `dist-tag` and the given tag does not pass the 226`--before` filter, the most recent version less than or equal to that tag 227will be used. For example, `foo@latest` might install `foo@1.2` even though 228`latest` is `2.0`. 229 230 231 232#### `bin-links` 233 234* Default: true 235* Type: Boolean 236 237Tells npm to create symlinks (or `.cmd` shims on Windows) for package 238executables. 239 240Set to false to have it not do this. This can be used to work around the 241fact that some file systems don't support symlinks, even on ostensibly Unix 242systems. 243 244 245 246#### `browser` 247 248* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"` 249* Type: null, Boolean, or String 250 251The browser that is called by npm commands to open websites. 252 253Set to `false` to suppress browser behavior and instead print urls to 254terminal. 255 256Set to `true` to use default system URL opener. 257 258 259 260#### `ca` 261 262* Default: null 263* Type: null or String (can be set multiple times) 264 265The Certificate Authority signing certificate that is trusted for SSL 266connections to the registry. Values should be in PEM format (Windows calls 267it "Base-64 encoded X.509 (.CER)") with newlines replaced by the string 268"\n". For example: 269 270```ini 271ca="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----" 272``` 273 274Set to `null` to only allow "known" registrars, or to a specific CA cert to 275trust only that specific signing authority. 276 277Multiple CAs can be trusted by specifying an array of certificates: 278 279```ini 280ca[]="..." 281ca[]="..." 282``` 283 284See also the `strict-ssl` config. 285 286 287 288#### `cache` 289 290* Default: Windows: `%LocalAppData%\npm-cache`, Posix: `~/.npm` 291* Type: Path 292 293The location of npm's cache directory. 294 295 296 297#### `cafile` 298 299* Default: null 300* Type: Path 301 302A path to a file containing one or multiple Certificate Authority signing 303certificates. Similar to the `ca` setting, but allows for multiple CA's, as 304well as for the CA information to be stored in a file on disk. 305 306 307 308#### `call` 309 310* Default: "" 311* Type: String 312 313Optional companion option for `npm exec`, `npx` that allows for specifying a 314custom command to be run along with the installed packages. 315 316```bash 317npm exec --package yo --package generator-node --call "yo node" 318``` 319 320 321 322#### `cidr` 323 324* Default: null 325* Type: null or String (can be set multiple times) 326 327This is a list of CIDR address to be used when configuring limited access 328tokens with the `npm token create` command. 329 330 331 332#### `color` 333 334* Default: true unless the NO_COLOR environ is set to something other than '0' 335* Type: "always" or Boolean 336 337If false, never shows colors. If `"always"` then always shows colors. If 338true, then only prints color codes for tty file descriptors. 339 340 341 342#### `commit-hooks` 343 344* Default: true 345* Type: Boolean 346 347Run git commit hooks when using the `npm version` command. 348 349 350 351#### `cpu` 352 353* Default: null 354* Type: null or String 355 356Override CPU architecture of native modules to install. Acceptable values 357are same as `cpu` field of package.json, which comes from `process.arch`. 358 359 360 361#### `depth` 362 363* Default: `Infinity` if `--all` is set, otherwise `1` 364* Type: null or Number 365 366The depth to go when recursing packages for `npm ls`. 367 368If not set, `npm ls` will show only the immediate dependencies of the root 369project. If `--all` is set, then npm will show all dependencies by default. 370 371 372 373#### `description` 374 375* Default: true 376* Type: Boolean 377 378Show the description in `npm search` 379 380 381 382#### `diff` 383 384* Default: 385* Type: String (can be set multiple times) 386 387Define arguments to compare in `npm diff`. 388 389 390 391#### `diff-dst-prefix` 392 393* Default: "b/" 394* Type: String 395 396Destination prefix to be used in `npm diff` output. 397 398 399 400#### `diff-ignore-all-space` 401 402* Default: false 403* Type: Boolean 404 405Ignore whitespace when comparing lines in `npm diff`. 406 407 408 409#### `diff-name-only` 410 411* Default: false 412* Type: Boolean 413 414Prints only filenames when using `npm diff`. 415 416 417 418#### `diff-no-prefix` 419 420* Default: false 421* Type: Boolean 422 423Do not show any source or destination prefix in `npm diff` output. 424 425Note: this causes `npm diff` to ignore the `--diff-src-prefix` and 426`--diff-dst-prefix` configs. 427 428 429 430#### `diff-src-prefix` 431 432* Default: "a/" 433* Type: String 434 435Source prefix to be used in `npm diff` output. 436 437 438 439#### `diff-text` 440 441* Default: false 442* Type: Boolean 443 444Treat all files as text in `npm diff`. 445 446 447 448#### `diff-unified` 449 450* Default: 3 451* Type: Number 452 453The number of lines of context to print in `npm diff`. 454 455 456 457#### `dry-run` 458 459* Default: false 460* Type: Boolean 461 462Indicates that you don't want npm to make any changes and that it should 463only report what it would have done. This can be passed into any of the 464commands that modify your local installation, eg, `install`, `update`, 465`dedupe`, `uninstall`, as well as `pack` and `publish`. 466 467Note: This is NOT honored by other network related commands, eg `dist-tags`, 468`owner`, etc. 469 470 471 472#### `editor` 473 474* Default: The EDITOR or VISUAL environment variables, or 475 '%SYSTEMROOT%\notepad.exe' on Windows, or 'vi' on Unix systems 476* Type: String 477 478The command to run for `npm edit` and `npm config edit`. 479 480 481 482#### `engine-strict` 483 484* Default: false 485* Type: Boolean 486 487If set to true, then npm will stubbornly refuse to install (or even consider 488installing) any package that claims to not be compatible with the current 489Node.js version. 490 491This can be overridden by setting the `--force` flag. 492 493 494 495#### `expect-result-count` 496 497* Default: null 498* Type: null or Number 499 500Tells to expect a specific number of results from the command. 501 502This config can not be used with: `expect-results` 503 504#### `expect-results` 505 506* Default: null 507* Type: null or Boolean 508 509Tells npm whether or not to expect results from the command. Can be either 510true (expect some results) or false (expect no results). 511 512This config can not be used with: `expect-result-count` 513 514#### `fetch-retries` 515 516* Default: 2 517* Type: Number 518 519The "retries" config for the `retry` module to use when fetching packages 520from the registry. 521 522npm will retry idempotent read requests to the registry in the case of 523network failures or 5xx HTTP errors. 524 525 526 527#### `fetch-retry-factor` 528 529* Default: 10 530* Type: Number 531 532The "factor" config for the `retry` module to use when fetching packages. 533 534 535 536#### `fetch-retry-maxtimeout` 537 538* Default: 60000 (1 minute) 539* Type: Number 540 541The "maxTimeout" config for the `retry` module to use when fetching 542packages. 543 544 545 546#### `fetch-retry-mintimeout` 547 548* Default: 10000 (10 seconds) 549* Type: Number 550 551The "minTimeout" config for the `retry` module to use when fetching 552packages. 553 554 555 556#### `fetch-timeout` 557 558* Default: 300000 (5 minutes) 559* Type: Number 560 561The maximum amount of time to wait for HTTP requests to complete. 562 563 564 565#### `force` 566 567* Default: false 568* Type: Boolean 569 570Removes various protections against unfortunate side effects, common 571mistakes, unnecessary performance degradation, and malicious input. 572 573* Allow clobbering non-npm files in global installs. 574* Allow the `npm version` command to work on an unclean git repository. 575* Allow deleting the cache folder with `npm cache clean`. 576* Allow installing packages that have an `engines` declaration requiring a 577 different version of npm. 578* Allow installing packages that have an `engines` declaration requiring a 579 different version of `node`, even if `--engine-strict` is enabled. 580* Allow `npm audit fix` to install modules outside your stated dependency 581 range (including SemVer-major changes). 582* Allow unpublishing all versions of a published package. 583* Allow conflicting peerDependencies to be installed in the root project. 584* Implicitly set `--yes` during `npm init`. 585* Allow clobbering existing values in `npm pkg` 586* Allow unpublishing of entire packages (not just a single version). 587 588If you don't have a clear idea of what you want to do, it is strongly 589recommended that you do not use this option! 590 591 592 593#### `foreground-scripts` 594 595* Default: `false` unless when using `npm pack` or `npm publish` where it 596 defaults to `true` 597* Type: Boolean 598 599Run all build scripts (ie, `preinstall`, `install`, and `postinstall`) 600scripts for installed packages in the foreground process, sharing standard 601input, output, and error with the main npm process. 602 603Note that this will generally make installs run slower, and be much noisier, 604but can be useful for debugging. 605 606 607 608#### `format-package-lock` 609 610* Default: true 611* Type: Boolean 612 613Format `package-lock.json` or `npm-shrinkwrap.json` as a human readable 614file. 615 616 617 618#### `fund` 619 620* Default: true 621* Type: Boolean 622 623When "true" displays the message at the end of each `npm install` 624acknowledging the number of dependencies looking for funding. See [`npm 625fund`](/commands/npm-fund) for details. 626 627 628 629#### `git` 630 631* Default: "git" 632* Type: String 633 634The command to use for git commands. If git is installed on the computer, 635but is not in the `PATH`, then set this to the full path to the git binary. 636 637 638 639#### `git-tag-version` 640 641* Default: true 642* Type: Boolean 643 644Tag the commit when using the `npm version` command. Setting this to false 645results in no commit being made at all. 646 647 648 649#### `global` 650 651* Default: false 652* Type: Boolean 653 654Operates in "global" mode, so that packages are installed into the `prefix` 655folder instead of the current working directory. See 656[folders](/configuring-npm/folders) for more on the differences in behavior. 657 658* packages are installed into the `{prefix}/lib/node_modules` folder, instead 659 of the current working directory. 660* bin files are linked to `{prefix}/bin` 661* man pages are linked to `{prefix}/share/man` 662 663 664 665#### `globalconfig` 666 667* Default: The global --prefix setting plus 'etc/npmrc'. For example, 668 '/usr/local/etc/npmrc' 669* Type: Path 670 671The config file to read for global config options. 672 673 674 675#### `heading` 676 677* Default: "npm" 678* Type: String 679 680The string that starts all the debugging log output. 681 682 683 684#### `https-proxy` 685 686* Default: null 687* Type: null or URL 688 689A proxy to use for outgoing https requests. If the `HTTPS_PROXY` or 690`https_proxy` or `HTTP_PROXY` or `http_proxy` environment variables are set, 691proxy settings will be honored by the underlying `make-fetch-happen` 692library. 693 694 695 696#### `if-present` 697 698* Default: false 699* Type: Boolean 700 701If true, npm will not exit with an error code when `run-script` is invoked 702for a script that isn't defined in the `scripts` section of `package.json`. 703This option can be used when it's desirable to optionally run a script when 704it's present and fail if the script fails. This is useful, for example, when 705running scripts that may only apply for some builds in an otherwise generic 706CI setup. 707 708This value is not exported to the environment for child processes. 709 710#### `ignore-scripts` 711 712* Default: false 713* Type: Boolean 714 715If true, npm does not run scripts specified in package.json files. 716 717Note that commands explicitly intended to run a particular script, such as 718`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` 719will still run their intended script if `ignore-scripts` is set, but they 720will *not* run any pre- or post-scripts. 721 722 723 724#### `include` 725 726* Default: 727* Type: "prod", "dev", "optional", or "peer" (can be set multiple times) 728 729Option that allows for defining which types of dependencies to install. 730 731This is the inverse of `--omit=<type>`. 732 733Dependency types specified in `--include` will not be omitted, regardless of 734the order in which omit/include are specified on the command-line. 735 736 737 738#### `include-staged` 739 740* Default: false 741* Type: Boolean 742 743Allow installing "staged" published packages, as defined by [npm RFC PR 744#92](https://github.com/npm/rfcs/pull/92). 745 746This is experimental, and not implemented by the npm public registry. 747 748 749 750#### `include-workspace-root` 751 752* Default: false 753* Type: Boolean 754 755Include the workspace root when workspaces are enabled for a command. 756 757When false, specifying individual workspaces via the `workspace` config, or 758all workspaces via the `workspaces` flag, will cause npm to operate only on 759the specified workspaces, and not on the root project. 760 761This value is not exported to the environment for child processes. 762 763#### `init-author-email` 764 765* Default: "" 766* Type: String 767 768The value `npm init` should use by default for the package author's email. 769 770 771 772#### `init-author-name` 773 774* Default: "" 775* Type: String 776 777The value `npm init` should use by default for the package author's name. 778 779 780 781#### `init-author-url` 782 783* Default: "" 784* Type: "" or URL 785 786The value `npm init` should use by default for the package author's 787homepage. 788 789 790 791#### `init-license` 792 793* Default: "ISC" 794* Type: String 795 796The value `npm init` should use by default for the package license. 797 798 799 800#### `init-module` 801 802* Default: "~/.npm-init.js" 803* Type: Path 804 805A module that will be loaded by the `npm init` command. See the 806documentation for the 807[init-package-json](https://github.com/npm/init-package-json) module for 808more information, or [npm init](/commands/npm-init). 809 810 811 812#### `init-version` 813 814* Default: "1.0.0" 815* Type: SemVer string 816 817The value that `npm init` should use by default for the package version 818number, if not already set in package.json. 819 820 821 822#### `install-links` 823 824* Default: false 825* Type: Boolean 826 827When set file: protocol dependencies will be packed and installed as regular 828dependencies instead of creating a symlink. This option has no effect on 829workspaces. 830 831 832 833#### `install-strategy` 834 835* Default: "hoisted" 836* Type: "hoisted", "nested", "shallow", or "linked" 837 838Sets the strategy for installing packages in node_modules. hoisted 839(default): Install non-duplicated in top-level, and duplicated as necessary 840within directory structure. nested: (formerly --legacy-bundling) install in 841place, no hoisting. shallow (formerly --global-style) only install direct 842deps at top-level. linked: (experimental) install in node_modules/.store, 843link in place, unhoisted. 844 845 846 847#### `json` 848 849* Default: false 850* Type: Boolean 851 852Whether or not to output JSON data, rather than the normal output. 853 854* In `npm pkg set` it enables parsing set values with JSON.parse() before 855 saving them to your `package.json`. 856 857Not supported by all npm commands. 858 859 860 861#### `legacy-peer-deps` 862 863* Default: false 864* Type: Boolean 865 866Causes npm to completely ignore `peerDependencies` when building a package 867tree, as in npm versions 3 through 6. 868 869If a package cannot be installed because of overly strict `peerDependencies` 870that collide, it provides a way to move forward resolving the situation. 871 872This differs from `--omit=peer`, in that `--omit=peer` will avoid unpacking 873`peerDependencies` on disk, but will still design a tree such that 874`peerDependencies` _could_ be unpacked in a correct place. 875 876Use of `legacy-peer-deps` is not recommended, as it will not enforce the 877`peerDependencies` contract that meta-dependencies may rely on. 878 879 880 881#### `libc` 882 883* Default: null 884* Type: null or String 885 886Override libc of native modules to install. Acceptable values are same as 887`libc` field of package.json 888 889 890 891#### `link` 892 893* Default: false 894* Type: Boolean 895 896Used with `npm ls`, limiting output to only those packages that are linked. 897 898 899 900#### `local-address` 901 902* Default: null 903* Type: IP Address 904 905The IP address of the local interface to use when making connections to the 906npm registry. Must be IPv4 in versions of Node prior to 0.12. 907 908 909 910#### `location` 911 912* Default: "user" unless `--global` is passed, which will also set this value 913 to "global" 914* Type: "global", "user", or "project" 915 916When passed to `npm config` this refers to which config file to use. 917 918When set to "global" mode, packages are installed into the `prefix` folder 919instead of the current working directory. See 920[folders](/configuring-npm/folders) for more on the differences in behavior. 921 922* packages are installed into the `{prefix}/lib/node_modules` folder, instead 923 of the current working directory. 924* bin files are linked to `{prefix}/bin` 925* man pages are linked to `{prefix}/share/man` 926 927 928 929#### `lockfile-version` 930 931* Default: Version 3 if no lockfile, auto-converting v1 lockfiles to v3, 932 otherwise maintain current lockfile version. 933* Type: null, 1, 2, 3, "1", "2", or "3" 934 935Set the lockfile format version to be used in package-lock.json and 936npm-shrinkwrap-json files. Possible options are: 937 9381: The lockfile version used by npm versions 5 and 6. Lacks some data that 939is used during the install, resulting in slower and possibly less 940deterministic installs. Prevents lockfile churn when interoperating with 941older npm versions. 942 9432: The default lockfile version used by npm version 7 and 8. Includes both 944the version 1 lockfile data and version 3 lockfile data, for maximum 945determinism and interoperability, at the expense of more bytes on disk. 946 9473: Only the new lockfile information introduced in npm version 7. Smaller on 948disk than lockfile version 2, but not interoperable with older npm versions. 949Ideal if all users are on npm version 7 and higher. 950 951 952 953#### `loglevel` 954 955* Default: "notice" 956* Type: "silent", "error", "warn", "notice", "http", "info", "verbose", or 957 "silly" 958 959What level of logs to report. All logs are written to a debug log, with the 960path to that file printed if the execution of a command fails. 961 962Any logs of a higher level than the setting are shown. The default is 963"notice". 964 965See also the `foreground-scripts` config. 966 967 968 969#### `logs-dir` 970 971* Default: A directory named `_logs` inside the cache 972* Type: null or Path 973 974The location of npm's log directory. See [`npm logging`](/using-npm/logging) 975for more information. 976 977 978 979#### `logs-max` 980 981* Default: 10 982* Type: Number 983 984The maximum number of log files to store. 985 986If set to 0, no log files will be written for the current run. 987 988 989 990#### `long` 991 992* Default: false 993* Type: Boolean 994 995Show extended information in `ls`, `search`, and `help-search`. 996 997 998 999#### `maxsockets` 1000 1001* Default: 15 1002* Type: Number 1003 1004The maximum number of connections to use per origin (protocol/host/port 1005combination). 1006 1007 1008 1009#### `message` 1010 1011* Default: "%s" 1012* Type: String 1013 1014Commit message which is used by `npm version` when creating version commit. 1015 1016Any "%s" in the message will be replaced with the version number. 1017 1018 1019 1020#### `node-options` 1021 1022* Default: null 1023* Type: null or String 1024 1025Options to pass through to Node.js via the `NODE_OPTIONS` environment 1026variable. This does not impact how npm itself is executed but it does impact 1027how lifecycle scripts are called. 1028 1029 1030 1031#### `noproxy` 1032 1033* Default: The value of the NO_PROXY environment variable 1034* Type: String (can be set multiple times) 1035 1036Domain extensions that should bypass any proxies. 1037 1038Also accepts a comma-delimited string. 1039 1040 1041 1042#### `offline` 1043 1044* Default: false 1045* Type: Boolean 1046 1047Force offline mode: no network requests will be done during install. To 1048allow the CLI to fill in missing cache data, see `--prefer-offline`. 1049 1050 1051 1052#### `omit` 1053 1054* Default: 'dev' if the `NODE_ENV` environment variable is set to 1055 'production', otherwise empty. 1056* Type: "dev", "optional", or "peer" (can be set multiple times) 1057 1058Dependency types to omit from the installation tree on disk. 1059 1060Note that these dependencies _are_ still resolved and added to the 1061`package-lock.json` or `npm-shrinkwrap.json` file. They are just not 1062physically installed on disk. 1063 1064If a package type appears in both the `--include` and `--omit` lists, then 1065it will be included. 1066 1067If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment 1068variable will be set to `'production'` for all lifecycle scripts. 1069 1070 1071 1072#### `omit-lockfile-registry-resolved` 1073 1074* Default: false 1075* Type: Boolean 1076 1077This option causes npm to create lock files without a `resolved` key for 1078registry dependencies. Subsequent installs will need to resolve tarball 1079endpoints with the configured registry, likely resulting in a longer install 1080time. 1081 1082 1083 1084#### `os` 1085 1086* Default: null 1087* Type: null or String 1088 1089Override OS of native modules to install. Acceptable values are same as `os` 1090field of package.json, which comes from `process.platform`. 1091 1092 1093 1094#### `otp` 1095 1096* Default: null 1097* Type: null or String 1098 1099This is a one-time password from a two-factor authenticator. It's needed 1100when publishing or changing package permissions with `npm access`. 1101 1102If not set, and a registry response fails with a challenge for a one-time 1103password, npm will prompt on the command line for one. 1104 1105 1106 1107#### `pack-destination` 1108 1109* Default: "." 1110* Type: String 1111 1112Directory in which `npm pack` will save tarballs. 1113 1114 1115 1116#### `package` 1117 1118* Default: 1119* Type: String (can be set multiple times) 1120 1121The package or packages to install for [`npm exec`](/commands/npm-exec) 1122 1123 1124 1125#### `package-lock` 1126 1127* Default: true 1128* Type: Boolean 1129 1130If set to false, then ignore `package-lock.json` files when installing. This 1131will also prevent _writing_ `package-lock.json` if `save` is true. 1132 1133 1134 1135#### `package-lock-only` 1136 1137* Default: false 1138* Type: Boolean 1139 1140If set to true, the current operation will only use the `package-lock.json`, 1141ignoring `node_modules`. 1142 1143For `update` this means only the `package-lock.json` will be updated, 1144instead of checking `node_modules` and downloading dependencies. 1145 1146For `list` this means the output will be based on the tree described by the 1147`package-lock.json`, rather than the contents of `node_modules`. 1148 1149 1150 1151#### `parseable` 1152 1153* Default: false 1154* Type: Boolean 1155 1156Output parseable results from commands that write to standard output. For 1157`npm search`, this will be tab-separated table format. 1158 1159 1160 1161#### `prefer-dedupe` 1162 1163* Default: false 1164* Type: Boolean 1165 1166Prefer to deduplicate packages if possible, rather than choosing a newer 1167version of a dependency. 1168 1169 1170 1171#### `prefer-offline` 1172 1173* Default: false 1174* Type: Boolean 1175 1176If true, staleness checks for cached data will be bypassed, but missing data 1177will be requested from the server. To force full offline mode, use 1178`--offline`. 1179 1180 1181 1182#### `prefer-online` 1183 1184* Default: false 1185* Type: Boolean 1186 1187If true, staleness checks for cached data will be forced, making the CLI 1188look for updates immediately even for fresh package data. 1189 1190 1191 1192#### `prefix` 1193 1194* Default: In global mode, the folder where the node executable is installed. 1195 Otherwise, the nearest parent folder containing either a package.json file 1196 or a node_modules folder. 1197* Type: Path 1198 1199The location to install global items. If set on the command line, then it 1200forces non-global commands to run in the specified folder. 1201 1202 1203 1204#### `preid` 1205 1206* Default: "" 1207* Type: String 1208 1209The "prerelease identifier" to use as a prefix for the "prerelease" part of 1210a semver. Like the `rc` in `1.2.0-rc.8`. 1211 1212 1213 1214#### `progress` 1215 1216* Default: `true` unless running in a known CI system 1217* Type: Boolean 1218 1219When set to `true`, npm will display a progress bar during time intensive 1220operations, if `process.stderr` is a TTY. 1221 1222Set to `false` to suppress the progress bar. 1223 1224 1225 1226#### `provenance` 1227 1228* Default: false 1229* Type: Boolean 1230 1231When publishing from a supported cloud CI/CD system, the package will be 1232publicly linked to where it was built and published from. 1233 1234This config can not be used with: `provenance-file` 1235 1236#### `provenance-file` 1237 1238* Default: null 1239* Type: Path 1240 1241When publishing, the provenance bundle at the given path will be used. 1242 1243This config can not be used with: `provenance` 1244 1245#### `proxy` 1246 1247* Default: null 1248* Type: null, false, or URL 1249 1250A proxy to use for outgoing http requests. If the `HTTP_PROXY` or 1251`http_proxy` environment variables are set, proxy settings will be honored 1252by the underlying `request` library. 1253 1254 1255 1256#### `read-only` 1257 1258* Default: false 1259* Type: Boolean 1260 1261This is used to mark a token as unable to publish when configuring limited 1262access tokens with the `npm token create` command. 1263 1264 1265 1266#### `rebuild-bundle` 1267 1268* Default: true 1269* Type: Boolean 1270 1271Rebuild bundled dependencies after installation. 1272 1273 1274 1275#### `registry` 1276 1277* Default: "https://registry.npmjs.org/" 1278* Type: URL 1279 1280The base URL of the npm registry. 1281 1282 1283 1284#### `replace-registry-host` 1285 1286* Default: "npmjs" 1287* Type: "npmjs", "never", "always", or String 1288 1289Defines behavior for replacing the registry host in a lockfile with the 1290configured registry. 1291 1292The default behavior is to replace package dist URLs from the default 1293registry (https://registry.npmjs.org) to the configured registry. If set to 1294"never", then use the registry value. If set to "always", then replace the 1295registry host with the configured host every time. 1296 1297You may also specify a bare hostname (e.g., "registry.npmjs.org"). 1298 1299 1300 1301#### `save` 1302 1303* Default: `true` unless when using `npm update` where it defaults to `false` 1304* Type: Boolean 1305 1306Save installed packages to a `package.json` file as dependencies. 1307 1308When used with the `npm rm` command, removes the dependency from 1309`package.json`. 1310 1311Will also prevent writing to `package-lock.json` if set to `false`. 1312 1313 1314 1315#### `save-bundle` 1316 1317* Default: false 1318* Type: Boolean 1319 1320If a package would be saved at install time by the use of `--save`, 1321`--save-dev`, or `--save-optional`, then also put it in the 1322`bundleDependencies` list. 1323 1324Ignored if `--save-peer` is set, since peerDependencies cannot be bundled. 1325 1326 1327 1328#### `save-dev` 1329 1330* Default: false 1331* Type: Boolean 1332 1333Save installed packages to a package.json file as `devDependencies`. 1334 1335 1336 1337#### `save-exact` 1338 1339* Default: false 1340* Type: Boolean 1341 1342Dependencies saved to package.json will be configured with an exact version 1343rather than using npm's default semver range operator. 1344 1345 1346 1347#### `save-optional` 1348 1349* Default: false 1350* Type: Boolean 1351 1352Save installed packages to a package.json file as `optionalDependencies`. 1353 1354 1355 1356#### `save-peer` 1357 1358* Default: false 1359* Type: Boolean 1360 1361Save installed packages to a package.json file as `peerDependencies` 1362 1363 1364 1365#### `save-prefix` 1366 1367* Default: "^" 1368* Type: String 1369 1370Configure how versions of packages installed to a package.json file via 1371`--save` or `--save-dev` get prefixed. 1372 1373For example if a package has version `1.2.3`, by default its version is set 1374to `^1.2.3` which allows minor upgrades for that package, but after `npm 1375config set save-prefix='~'` it would be set to `~1.2.3` which only allows 1376patch upgrades. 1377 1378 1379 1380#### `save-prod` 1381 1382* Default: false 1383* Type: Boolean 1384 1385Save installed packages into `dependencies` specifically. This is useful if 1386a package already exists in `devDependencies` or `optionalDependencies`, but 1387you want to move it to be a non-optional production dependency. 1388 1389This is the default behavior if `--save` is true, and neither `--save-dev` 1390or `--save-optional` are true. 1391 1392 1393 1394#### `sbom-format` 1395 1396* Default: null 1397* Type: "cyclonedx" or "spdx" 1398 1399SBOM format to use when generating SBOMs. 1400 1401 1402 1403#### `sbom-type` 1404 1405* Default: "library" 1406* Type: "library", "application", or "framework" 1407 1408The type of package described by the generated SBOM. For SPDX, this is the 1409value for the `primaryPackagePurpose` field. For CycloneDX, this is the 1410value for the `type` field. 1411 1412 1413 1414#### `scope` 1415 1416* Default: the scope of the current project, if any, or "" 1417* Type: String 1418 1419Associate an operation with a scope for a scoped registry. 1420 1421Useful when logging in to or out of a private registry: 1422 1423``` 1424# log in, linking the scope to the custom registry 1425npm login --scope=@mycorp --registry=https://registry.mycorp.com 1426 1427# log out, removing the link and the auth token 1428npm logout --scope=@mycorp 1429``` 1430 1431This will cause `@mycorp` to be mapped to the registry for future 1432installation of packages specified according to the pattern 1433`@mycorp/package`. 1434 1435This will also cause `npm init` to create a scoped package. 1436 1437``` 1438# accept all defaults, and create a package named "@foo/whatever", 1439# instead of just named "whatever" 1440npm init --scope=@foo --yes 1441``` 1442 1443 1444 1445#### `script-shell` 1446 1447* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows 1448* Type: null or String 1449 1450The shell to use for scripts run with the `npm exec`, `npm run` and `npm 1451init <package-spec>` commands. 1452 1453 1454 1455#### `searchexclude` 1456 1457* Default: "" 1458* Type: String 1459 1460Space-separated options that limit the results from search. 1461 1462 1463 1464#### `searchlimit` 1465 1466* Default: 20 1467* Type: Number 1468 1469Number of items to limit search results to. Will not apply at all to legacy 1470searches. 1471 1472 1473 1474#### `searchopts` 1475 1476* Default: "" 1477* Type: String 1478 1479Space-separated options that are always passed to search. 1480 1481 1482 1483#### `searchstaleness` 1484 1485* Default: 900 1486* Type: Number 1487 1488The age of the cache, in seconds, before another registry request is made if 1489using legacy search endpoint. 1490 1491 1492 1493#### `shell` 1494 1495* Default: SHELL environment variable, or "bash" on Posix, or "cmd.exe" on 1496 Windows 1497* Type: String 1498 1499The shell to run for the `npm explore` command. 1500 1501 1502 1503#### `sign-git-commit` 1504 1505* Default: false 1506* Type: Boolean 1507 1508If set to true, then the `npm version` command will commit the new package 1509version using `-S` to add a signature. 1510 1511Note that git requires you to have set up GPG keys in your git configs for 1512this to work properly. 1513 1514 1515 1516#### `sign-git-tag` 1517 1518* Default: false 1519* Type: Boolean 1520 1521If set to true, then the `npm version` command will tag the version using 1522`-s` to add a signature. 1523 1524Note that git requires you to have set up GPG keys in your git configs for 1525this to work properly. 1526 1527 1528 1529#### `strict-peer-deps` 1530 1531* Default: false 1532* Type: Boolean 1533 1534If set to `true`, and `--legacy-peer-deps` is not set, then _any_ 1535conflicting `peerDependencies` will be treated as an install failure, even 1536if npm could reasonably guess the appropriate resolution based on non-peer 1537dependency relationships. 1538 1539By default, conflicting `peerDependencies` deep in the dependency graph will 1540be resolved using the nearest non-peer dependency specification, even if 1541doing so will result in some packages receiving a peer dependency outside 1542the range set in their package's `peerDependencies` object. 1543 1544When such an override is performed, a warning is printed, explaining the 1545conflict and the packages involved. If `--strict-peer-deps` is set, then 1546this warning is treated as a failure. 1547 1548 1549 1550#### `strict-ssl` 1551 1552* Default: true 1553* Type: Boolean 1554 1555Whether or not to do SSL key validation when making requests to the registry 1556via https. 1557 1558See also the `ca` config. 1559 1560 1561 1562#### `tag` 1563 1564* Default: "latest" 1565* Type: String 1566 1567If you ask npm to install a package and don't tell it a specific version, 1568then it will install the specified tag. 1569 1570Also the tag that is added to the package@version specified by the `npm tag` 1571command, if no explicit tag is given. 1572 1573When used by the `npm diff` command, this is the tag used to fetch the 1574tarball that will be compared with the local files by default. 1575 1576 1577 1578#### `tag-version-prefix` 1579 1580* Default: "v" 1581* Type: String 1582 1583If set, alters the prefix used when tagging a new version when performing a 1584version increment using `npm version`. To remove the prefix altogether, set 1585it to the empty string: `""`. 1586 1587Because other tools may rely on the convention that npm version tags look 1588like `v1.0.0`, _only use this property if it is absolutely necessary_. In 1589particular, use care when overriding this setting for public packages. 1590 1591 1592 1593#### `timing` 1594 1595* Default: false 1596* Type: Boolean 1597 1598If true, writes timing information to a process specific json file in the 1599cache or `logs-dir`. The file name ends with `-timing.json`. 1600 1601You can quickly view it with this [json](https://npm.im/json) command line: 1602`cat ~/.npm/_logs/*-timing.json | npm exec -- json -g`. 1603 1604Timing information will also be reported in the terminal. To suppress this 1605while still writing the timing file, use `--silent`. 1606 1607 1608 1609#### `umask` 1610 1611* Default: 0 1612* Type: Octal numeric string in range 0000..0777 (0..511) 1613 1614The "umask" value to use when setting the file creation mode on files and 1615folders. 1616 1617Folders and executables are given a mode which is `0o777` masked against 1618this value. Other files are given a mode which is `0o666` masked against 1619this value. 1620 1621Note that the underlying system will _also_ apply its own umask value to 1622files and folders that are created, and npm does not circumvent this, but 1623rather adds the `--umask` config to it. 1624 1625Thus, the effective default umask value on most POSIX systems is 0o22, 1626meaning that folders and executables are created with a mode of 0o755 and 1627other files are created with a mode of 0o644. 1628 1629 1630 1631#### `unicode` 1632 1633* Default: false on windows, true on mac/unix systems with a unicode locale, 1634 as defined by the `LC_ALL`, `LC_CTYPE`, or `LANG` environment variables. 1635* Type: Boolean 1636 1637When set to true, npm uses unicode characters in the tree output. When 1638false, it uses ascii characters instead of unicode glyphs. 1639 1640 1641 1642#### `update-notifier` 1643 1644* Default: true 1645* Type: Boolean 1646 1647Set to false to suppress the update notification when using an older version 1648of npm than the latest. 1649 1650 1651 1652#### `usage` 1653 1654* Default: false 1655* Type: Boolean 1656 1657Show short usage output about the command specified. 1658 1659 1660 1661#### `user-agent` 1662 1663* Default: "npm/{npm-version} node/{node-version} {platform} {arch} 1664 workspaces/{workspaces} {ci}" 1665* Type: String 1666 1667Sets the User-Agent request header. The following fields are replaced with 1668their actual counterparts: 1669 1670* `{npm-version}` - The npm version in use 1671* `{node-version}` - The Node.js version in use 1672* `{platform}` - The value of `process.platform` 1673* `{arch}` - The value of `process.arch` 1674* `{workspaces}` - Set to `true` if the `workspaces` or `workspace` options 1675 are set. 1676* `{ci}` - The value of the `ci-name` config, if set, prefixed with `ci/`, or 1677 an empty string if `ci-name` is empty. 1678 1679 1680 1681#### `userconfig` 1682 1683* Default: "~/.npmrc" 1684* Type: Path 1685 1686The location of user-level configuration settings. 1687 1688This may be overridden by the `npm_config_userconfig` environment variable 1689or the `--userconfig` command line option, but may _not_ be overridden by 1690settings in the `globalconfig` file. 1691 1692 1693 1694#### `version` 1695 1696* Default: false 1697* Type: Boolean 1698 1699If true, output the npm version and exit successfully. 1700 1701Only relevant when specified explicitly on the command line. 1702 1703 1704 1705#### `versions` 1706 1707* Default: false 1708* Type: Boolean 1709 1710If true, output the npm version as well as node's `process.versions` map and 1711the version in the current working directory's `package.json` file if one 1712exists, and exit successfully. 1713 1714Only relevant when specified explicitly on the command line. 1715 1716 1717 1718#### `viewer` 1719 1720* Default: "man" on Posix, "browser" on Windows 1721* Type: String 1722 1723The program to use to view help content. 1724 1725Set to `"browser"` to view html help content in the default web browser. 1726 1727 1728 1729#### `which` 1730 1731* Default: null 1732* Type: null or Number 1733 1734If there are multiple funding sources, which 1-indexed source URL to open. 1735 1736 1737 1738#### `workspace` 1739 1740* Default: 1741* Type: String (can be set multiple times) 1742 1743Enable running a command in the context of the configured workspaces of the 1744current project while filtering by running only the workspaces defined by 1745this configuration option. 1746 1747Valid values for the `workspace` config are either: 1748 1749* Workspace names 1750* Path to a workspace directory 1751* Path to a parent workspace directory (will result in selecting all 1752 workspaces within that folder) 1753 1754When set for the `npm init` command, this may be set to the folder of a 1755workspace which does not yet exist, to create the folder and set it up as a 1756brand new workspace within the project. 1757 1758This value is not exported to the environment for child processes. 1759 1760#### `workspaces` 1761 1762* Default: null 1763* Type: null or Boolean 1764 1765Set to true to run the command in the context of **all** configured 1766workspaces. 1767 1768Explicitly setting this to false will cause commands like `install` to 1769ignore workspaces altogether. When not set explicitly: 1770 1771- Commands that operate on the `node_modules` tree (install, update, etc.) 1772will link workspaces into the `node_modules` folder. - Commands that do 1773other things (test, exec, publish, etc.) will operate on the root project, 1774_unless_ one or more workspaces are specified in the `workspace` config. 1775 1776This value is not exported to the environment for child processes. 1777 1778#### `workspaces-update` 1779 1780* Default: true 1781* Type: Boolean 1782 1783If set to true, the npm cli will run an update after operations that may 1784possibly change the workspaces installed to the `node_modules` folder. 1785 1786 1787 1788#### `yes` 1789 1790* Default: null 1791* Type: null or Boolean 1792 1793Automatically answer "yes" to any prompts that npm might print on the 1794command line. 1795 1796 1797 1798#### `also` 1799 1800* Default: null 1801* Type: null, "dev", or "development" 1802* DEPRECATED: Please use --include=dev instead. 1803 1804When set to `dev` or `development`, this is an alias for `--include=dev`. 1805 1806 1807 1808#### `cache-max` 1809 1810* Default: Infinity 1811* Type: Number 1812* DEPRECATED: This option has been deprecated in favor of `--prefer-online` 1813 1814`--cache-max=0` is an alias for `--prefer-online` 1815 1816 1817 1818#### `cache-min` 1819 1820* Default: 0 1821* Type: Number 1822* DEPRECATED: This option has been deprecated in favor of `--prefer-offline`. 1823 1824`--cache-min=9999 (or bigger)` is an alias for `--prefer-offline`. 1825 1826 1827 1828#### `cert` 1829 1830* Default: null 1831* Type: null or String 1832* DEPRECATED: `key` and `cert` are no longer used for most registry 1833 operations. Use registry scoped `keyfile` and `certfile` instead. Example: 1834 //other-registry.tld/:keyfile=/path/to/key.pem 1835 //other-registry.tld/:certfile=/path/to/cert.crt 1836 1837A client certificate to pass when accessing the registry. Values should be 1838in PEM format (Windows calls it "Base-64 encoded X.509 (.CER)") with 1839newlines replaced by the string "\n". For example: 1840 1841```ini 1842cert="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----" 1843``` 1844 1845It is _not_ the path to a certificate file, though you can set a 1846registry-scoped "certfile" path like 1847"//other-registry.tld/:certfile=/path/to/cert.pem". 1848 1849 1850 1851#### `dev` 1852 1853* Default: false 1854* Type: Boolean 1855* DEPRECATED: Please use --include=dev instead. 1856 1857Alias for `--include=dev`. 1858 1859 1860 1861#### `global-style` 1862 1863* Default: false 1864* Type: Boolean 1865* DEPRECATED: This option has been deprecated in favor of 1866 `--install-strategy=shallow` 1867 1868Only install direct dependencies in the top level `node_modules`, but hoist 1869on deeper dependencies. Sets `--install-strategy=shallow`. 1870 1871 1872 1873#### `init.author.email` 1874 1875* Default: "" 1876* Type: String 1877* DEPRECATED: Use `--init-author-email` instead. 1878 1879Alias for `--init-author-email` 1880 1881 1882 1883#### `init.author.name` 1884 1885* Default: "" 1886* Type: String 1887* DEPRECATED: Use `--init-author-name` instead. 1888 1889Alias for `--init-author-name` 1890 1891 1892 1893#### `init.author.url` 1894 1895* Default: "" 1896* Type: "" or URL 1897* DEPRECATED: Use `--init-author-url` instead. 1898 1899Alias for `--init-author-url` 1900 1901 1902 1903#### `init.license` 1904 1905* Default: "ISC" 1906* Type: String 1907* DEPRECATED: Use `--init-license` instead. 1908 1909Alias for `--init-license` 1910 1911 1912 1913#### `init.module` 1914 1915* Default: "~/.npm-init.js" 1916* Type: Path 1917* DEPRECATED: Use `--init-module` instead. 1918 1919Alias for `--init-module` 1920 1921 1922 1923#### `init.version` 1924 1925* Default: "1.0.0" 1926* Type: SemVer string 1927* DEPRECATED: Use `--init-version` instead. 1928 1929Alias for `--init-version` 1930 1931 1932 1933#### `key` 1934 1935* Default: null 1936* Type: null or String 1937* DEPRECATED: `key` and `cert` are no longer used for most registry 1938 operations. Use registry scoped `keyfile` and `certfile` instead. Example: 1939 //other-registry.tld/:keyfile=/path/to/key.pem 1940 //other-registry.tld/:certfile=/path/to/cert.crt 1941 1942A client key to pass when accessing the registry. Values should be in PEM 1943format with newlines replaced by the string "\n". For example: 1944 1945```ini 1946key="-----BEGIN PRIVATE KEY-----\nXXXX\nXXXX\n-----END PRIVATE KEY-----" 1947``` 1948 1949It is _not_ the path to a key file, though you can set a registry-scoped 1950"keyfile" path like "//other-registry.tld/:keyfile=/path/to/key.pem". 1951 1952 1953 1954#### `legacy-bundling` 1955 1956* Default: false 1957* Type: Boolean 1958* DEPRECATED: This option has been deprecated in favor of 1959 `--install-strategy=nested` 1960 1961Instead of hoisting package installs in `node_modules`, install packages in 1962the same manner that they are depended on. This may cause very deep 1963directory structures and duplicate package installs as there is no 1964de-duplicating. Sets `--install-strategy=nested`. 1965 1966 1967 1968#### `only` 1969 1970* Default: null 1971* Type: null, "prod", or "production" 1972* DEPRECATED: Use `--omit=dev` to omit dev dependencies from the install. 1973 1974When set to `prod` or `production`, this is an alias for `--omit=dev`. 1975 1976 1977 1978#### `optional` 1979 1980* Default: null 1981* Type: null or Boolean 1982* DEPRECATED: Use `--omit=optional` to exclude optional dependencies, or 1983 `--include=optional` to include them. 1984 1985Default value does install optional deps unless otherwise omitted. 1986 1987Alias for --include=optional or --omit=optional 1988 1989 1990 1991#### `production` 1992 1993* Default: null 1994* Type: null or Boolean 1995* DEPRECATED: Use `--omit=dev` instead. 1996 1997Alias for `--omit=dev` 1998 1999 2000 2001#### `shrinkwrap` 2002 2003* Default: true 2004* Type: Boolean 2005* DEPRECATED: Use the --package-lock setting instead. 2006 2007Alias for --package-lock 2008 2009 2010 2011### See also 2012 2013* [npm config](/commands/npm-config) 2014* [npmrc](/configuring-npm/npmrc) 2015* [npm scripts](/using-npm/scripts) 2016* [npm folders](/configuring-npm/folders) 2017* [npm](/commands/npm) 2018