config.html 76 KB

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