Simple email application for Android. Original source code: https://framagit.org/dystopia-project/simple-email
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1068 lines
45 KiB

  1. <!doctype html>
  2. <html>
  3. <title>npm-config</title>
  4. <meta charset="utf-8">
  5. <link rel="stylesheet" type="text/css" href="../../static/style.css">
  6. <link rel="canonical" href="https://www.npmjs.org/doc/misc/npm-config.html">
  7. <script async=true src="../../static/toc.js"></script>
  8. <body>
  9. <div id="wrapper">
  10. <h1><a href="../misc/npm-config.html">npm-config</a></h1> <p>More than you probably want to know about npm configuration</p>
  11. <h2 id="description">DESCRIPTION</h2>
  12. <p>npm gets its configuration values from the following sources, sorted by priority:</p>
  13. <h3 id="command-line-flags">Command Line Flags</h3>
  14. <p>Putting <code>--foo bar</code> on the command line sets the <code>foo</code> configuration
  15. parameter to <code>&quot;bar&quot;</code>. A <code>--</code> argument tells the cli parser to stop
  16. reading flags. Using <code>--flag</code> without specifying any value will set
  17. the value to <code>true</code>.</p>
  18. <p>Example: <code>--flag1 --flag2</code> will set both configuration parameters
  19. to <code>true</code>, while <code>--flag1 --flag2 bar</code> will set <code>flag1</code> to <code>true</code>,
  20. and <code>flag2</code> to <code>bar</code>. Finally, <code>--flag1 --flag2 -- bar</code> will set
  21. both configuration parameters to <code>true</code>, and the <code>bar</code> is taken
  22. as a command argument.</p>
  23. <h3 id="environment-variables">Environment Variables</h3>
  24. <p>Any environment variables that start with <code>npm_config_</code> will be
  25. interpreted as a configuration parameter. For example, putting
  26. <code>npm_config_foo=bar</code> in your environment will set the <code>foo</code>
  27. configuration parameter to <code>bar</code>. Any environment configurations that
  28. are not given a value will be given the value of <code>true</code>. Config
  29. values are case-insensitive, so <code>NPM_CONFIG_FOO=bar</code> will work the
  30. same. However, please note that inside <a href="/misc/scripts">npm-scripts</a>
  31. npm will set its own environment variables and Node will prefer
  32. those lowercase versions over any uppercase ones that you might set.
  33. For details see <a href="https://github.com/npm/npm/issues/14528">this issue</a>.</p>
  34. <p>Notice that you need to use underscores instead of dashes, so <code>--allow-same-version</code>
  35. would become <code>npm_config_allow_same_version=true</code>.</p>
  36. <h3 id="npmrc-files">npmrc Files</h3>
  37. <p>The four relevant files are:</p>
  38. <ul>
  39. <li>per-project configuration file (<code>/path/to/my/project/.npmrc</code>)</li>
  40. <li>per-user configuration file (defaults to <code>$HOME/.npmrc</code>; configurable via CLI
  41. option <code>--userconfig</code> or environment variable <code>$NPM_CONFIG_USERCONFIG</code>)</li>
  42. <li>global configuration file (defaults to <code>$PREFIX/etc/npmrc</code>; configurable via
  43. CLI option <code>--globalconfig</code> or environment variable <code>$NPM_CONFIG_GLOBALCONFIG</code>)</li>
  44. <li>npm&#39;s built-in configuration file (<code>/path/to/npm/npmrc</code>)</li>
  45. </ul>
  46. <p>See <a href="../files/npmrc.html">npmrc(5)</a> for more details.</p>
  47. <h3 id="default-configs">Default Configs</h3>
  48. <p>Run <code>npm config ls -l</code> to see a set of configuration parameters that are
  49. internal to npm, and are defaults if nothing else is specified.</p>
  50. <h2 id="shorthands-and-other-cli-niceties">Shorthands and Other CLI Niceties</h2>
  51. <p>The following shorthands are parsed on the command-line:</p>
  52. <ul>
  53. <li><code>-v</code>: <code>--version</code></li>
  54. <li><code>-h</code>, <code>-?</code>, <code>--help</code>, <code>-H</code>: <code>--usage</code></li>
  55. <li><code>-s</code>, <code>--silent</code>: <code>--loglevel silent</code></li>
  56. <li><code>-q</code>, <code>--quiet</code>: <code>--loglevel warn</code></li>
  57. <li><code>-d</code>: <code>--loglevel info</code></li>
  58. <li><code>-dd</code>, <code>--verbose</code>: <code>--loglevel verbose</code></li>
  59. <li><code>-ddd</code>: <code>--loglevel silly</code></li>
  60. <li><code>-g</code>: <code>--global</code></li>
  61. <li><code>-C</code>: <code>--prefix</code></li>
  62. <li><code>-l</code>: <code>--long</code></li>
  63. <li><code>-m</code>: <code>--message</code></li>
  64. <li><code>-p</code>, <code>--porcelain</code>: <code>--parseable</code></li>
  65. <li><code>-reg</code>: <code>--registry</code></li>
  66. <li><code>-f</code>: <code>--force</code></li>
  67. <li><code>-desc</code>: <code>--description</code></li>
  68. <li><code>-S</code>: <code>--save</code></li>
  69. <li><code>-P</code>: <code>--save-prod</code></li>
  70. <li><code>-D</code>: <code>--save-dev</code></li>
  71. <li><code>-O</code>: <code>--save-optional</code></li>
  72. <li><code>-B</code>: <code>--save-bundle</code></li>
  73. <li><code>-E</code>: <code>--save-exact</code></li>
  74. <li><code>-y</code>: <code>--yes</code></li>
  75. <li><code>-n</code>: <code>--yes false</code></li>
  76. <li><code>ll</code> and <code>la</code> commands: <code>ls --long</code></li>
  77. </ul>
  78. <p>If the specified configuration param resolves unambiguously to a known
  79. configuration parameter, then it is expanded to that configuration
  80. parameter. For example:</p>
  81. <pre><code>npm ls --par
  82. # same as:
  83. npm ls --parseable</code></pre><p>If multiple single-character shorthands are strung together, and the
  84. resulting combination is unambiguously not some other configuration
  85. param, then it is expanded to its various component pieces. For
  86. example:</p>
  87. <pre><code>npm ls -gpld
  88. # same as:
  89. npm ls --global --parseable --long --loglevel info</code></pre><h2 id="per-package-config-settings">Per-Package Config Settings</h2>
  90. <p>When running scripts (see <code><a href="../misc/npm-scripts.html">npm-scripts(7)</a></code>) the package.json &quot;config&quot;
  91. keys are overwritten in the environment if there is a config param of
  92. <code>&lt;name&gt;[@&lt;version&gt;]:&lt;key&gt;</code>. For example, if the package.json has
  93. this:</p>
  94. <pre><code>{ &quot;name&quot; : &quot;foo&quot;
  95. , &quot;config&quot; : { &quot;port&quot; : &quot;8080&quot; }
  96. , &quot;scripts&quot; : { &quot;start&quot; : &quot;node server.js&quot; } }</code></pre><p>and the server.js is this:</p>
  97. <pre><code>http.createServer(...).listen(process.env.npm_package_config_port)</code></pre><p>then the user could change the behavior by doing:</p>
  98. <pre><code>npm config set foo:port 80</code></pre><p>See <a href="../files/package.json.html">package.json(5)</a> for more information.</p>
  99. <h2 id="config-settings">Config Settings</h2>
  100. <h3 id="access">access</h3>
  101. <ul>
  102. <li>Default: <code>restricted</code></li>
  103. <li>Type: Access</li>
  104. </ul>
  105. <p>When publishing scoped packages, the access level defaults to <code>restricted</code>. If
  106. you want your scoped package to be publicly viewable (and installable) set
  107. <code>--access=public</code>. The only valid values for <code>access</code> are <code>public</code> and
  108. <code>restricted</code>. Unscoped packages <em>always</em> have an access level of <code>public</code>.</p>
  109. <h3 id="allow-same-version">allow-same-version</h3>
  110. <ul>
  111. <li>Default: false</li>
  112. <li>Type: Boolean</li>
  113. </ul>
  114. <p>Prevents throwing an error when <code>npm version</code> is used to set the new version
  115. to the same value as the current version.</p>
  116. <h3 id="always-auth">always-auth</h3>
  117. <ul>
  118. <li>Default: false</li>
  119. <li>Type: Boolean</li>
  120. </ul>
  121. <p>Force npm to always require authentication when accessing the registry,
  122. even for <code>GET</code> requests.</p>
  123. <h3 id="also">also</h3>
  124. <ul>
  125. <li>Default: null</li>
  126. <li>Type: String</li>
  127. </ul>
  128. <p>When &quot;dev&quot; or &quot;development&quot; and running local <code>npm shrinkwrap</code>,
  129. <code>npm outdated</code>, or <code>npm update</code>, is an alias for <code>--dev</code>.</p>
  130. <h3 id="audit">audit</h3>
  131. <ul>
  132. <li>Default: true</li>
  133. <li>Type: Boolean</li>
  134. </ul>
  135. <p>When &quot;true&quot; submit audit reports alongside <code>npm install</code> runs to the default
  136. registry and all registries configured for scopes. See the documentation
  137. for <a href="../cli/npm-audit.html">npm-audit(1)</a> for details on what is submitted.</p>
  138. <h3 id="audit-level">audit-level</h3>
  139. <ul>
  140. <li>Default: <code>&quot;low&quot;</code></li>
  141. <li>Type: <code>&#39;low&#39;</code>, <code>&#39;moderate&#39;</code>, <code>&#39;high&#39;</code>, <code>&#39;critical&#39;</code></li>
  142. </ul>
  143. <p>The minimum level of vulnerability for <code>npm audit</code> to exit with
  144. a non-zero exit code.</p>
  145. <h3 id="auth-type">auth-type</h3>
  146. <ul>
  147. <li>Default: <code>&#39;legacy&#39;</code></li>
  148. <li>Type: <code>&#39;legacy&#39;</code>, <code>&#39;sso&#39;</code>, <code>&#39;saml&#39;</code>, <code>&#39;oauth&#39;</code></li>
  149. </ul>
  150. <p>What authentication strategy to use with <code>adduser</code>/<code>login</code>.</p>
  151. <h3 id="bin-links">bin-links</h3>
  152. <ul>
  153. <li>Default: <code>true</code></li>
  154. <li>Type: Boolean</li>
  155. </ul>
  156. <p>Tells npm to create symlinks (or <code>.cmd</code> shims on Windows) for package
  157. executables.</p>
  158. <p>Set to false to have it not do this. This can be used to work around
  159. the fact that some file systems don&#39;t support symlinks, even on
  160. ostensibly Unix systems.</p>
  161. <h3 id="browser">browser</h3>
  162. <ul>
  163. <li>Default: OS X: <code>&quot;open&quot;</code>, Windows: <code>&quot;start&quot;</code>, Others: <code>&quot;xdg-open&quot;</code></li>
  164. <li>Type: String</li>
  165. </ul>
  166. <p>The browser that is called by the <code>npm docs</code> command to open websites.</p>
  167. <h3 id="ca">ca</h3>
  168. <ul>
  169. <li>Default: The npm CA certificate</li>
  170. <li>Type: String, Array or null</li>
  171. </ul>
  172. <p>The Certificate Authority signing certificate that is trusted for SSL
  173. connections to the registry. Values should be in PEM format (Windows calls it &quot;Base-64 encoded X.509 (.CER)&quot;) with newlines
  174. replaced by the string &quot;\n&quot;. For example:</p>
  175. <pre><code>ca=&quot;-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----&quot;</code></pre><p>Set to <code>null</code> to only allow &quot;known&quot; registrars, or to a specific CA cert
  176. to trust only that specific signing authority.</p>
  177. <p>Multiple CAs can be trusted by specifying an array of certificates:</p>
  178. <pre><code>ca[]=&quot;...&quot;
  179. ca[]=&quot;...&quot;</code></pre><p>See also the <code>strict-ssl</code> config.</p>
  180. <h3 id="cafile">cafile</h3>
  181. <ul>
  182. <li>Default: <code>null</code></li>
  183. <li>Type: path</li>
  184. </ul>
  185. <p>A path to a file containing one or multiple Certificate Authority signing
  186. certificates. Similar to the <code>ca</code> setting, but allows for multiple CA&#39;s, as
  187. well as for the CA information to be stored in a file on disk.</p>
  188. <h3 id="cache">cache</h3>
  189. <ul>
  190. <li>Default: Windows: <code>%AppData%\npm-cache</code>, Posix: <code>~/.npm</code></li>
  191. <li>Type: path</li>
  192. </ul>
  193. <p>The location of npm&#39;s cache directory. See <code><a href="../cli/npm-cache.html">npm-cache(1)</a></code></p>
  194. <h3 id="cache-lock-stale">cache-lock-stale</h3>
  195. <ul>
  196. <li>Default: 60000 (1 minute)</li>
  197. <li>Type: Number</li>
  198. </ul>
  199. <p>The number of ms before cache folder lockfiles are considered stale.</p>
  200. <h3 id="cache-lock-retries">cache-lock-retries</h3>
  201. <ul>
  202. <li>Default: 10</li>
  203. <li>Type: Number</li>
  204. </ul>
  205. <p>Number of times to retry to acquire a lock on cache folder lockfiles.</p>
  206. <h3 id="cache-lock-wait">cache-lock-wait</h3>
  207. <ul>
  208. <li>Default: 10000 (10 seconds)</li>
  209. <li>Type: Number</li>
  210. </ul>
  211. <p>Number of ms to wait for cache lock files to expire.</p>
  212. <h3 id="cache-max">cache-max</h3>
  213. <ul>
  214. <li>Default: Infinity</li>
  215. <li>Type: Number</li>
  216. </ul>
  217. <p><strong>DEPRECATED</strong>: This option has been deprecated in favor of <code>--prefer-online</code>.</p>
  218. <p><code>--cache-max=0</code> is an alias for <code>--prefer-online</code>.</p>
  219. <h3 id="cache-min">cache-min</h3>
  220. <ul>
  221. <li>Default: 10</li>
  222. <li>Type: Number</li>
  223. </ul>
  224. <p><strong>DEPRECATED</strong>: This option has been deprecated in favor of <code>--prefer-offline</code>.</p>
  225. <p><code>--cache-min=9999 (or bigger)</code> is an alias for <code>--prefer-offline</code>.</p>
  226. <h3 id="cert">cert</h3>
  227. <ul>
  228. <li>Default: <code>null</code></li>
  229. <li>Type: String</li>
  230. </ul>
  231. <p>A client certificate to pass when accessing the registry. Values should be in
  232. PEM format (Windows calls it &quot;Base-64 encoded X.509 (.CER)&quot;) with newlines replaced by the string &quot;\n&quot;. For example:</p>
  233. <pre><code>cert=&quot;-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----&quot;</code></pre><p>It is <em>not</em> the path to a certificate file (and there is no &quot;certfile&quot; option).</p>
  234. <h3 id="cidr">cidr</h3>
  235. <ul>
  236. <li>Default: <code>null</code></li>
  237. <li>Type: String, Array, null</li>
  238. </ul>
  239. <p>This is a list of CIDR address to be used when configuring limited access tokens with the <code>npm token create</code> command.</p>
  240. <h3 id="color">color</h3>
  241. <ul>
  242. <li>Default: true</li>
  243. <li>Type: Boolean or <code>&quot;always&quot;</code></li>
  244. </ul>
  245. <p>If false, never shows colors. If <code>&quot;always&quot;</code> then always shows colors.
  246. If true, then only prints color codes for tty file descriptors.</p>
  247. <p>This option can also be changed using the environment: colors are
  248. disabled when the environment variable <code>NO_COLOR</code> is set to any value.</p>
  249. <h3 id="depth">depth</h3>
  250. <ul>
  251. <li>Default: Infinity</li>
  252. <li>Type: Number</li>
  253. </ul>
  254. <p>The depth to go when recursing directories for <code>npm ls</code>,
  255. <code>npm cache ls</code>, and <code>npm outdated</code>.</p>
  256. <p>For <code>npm outdated</code>, a setting of <code>Infinity</code> will be treated as <code>0</code>
  257. since that gives more useful information. To show the outdated status
  258. of all packages and dependents, use a large integer value,
  259. e.g., <code>npm outdated --depth 9999</code></p>
  260. <h3 id="description">description</h3>
  261. <ul>
  262. <li>Default: true</li>
  263. <li>Type: Boolean</li>
  264. </ul>
  265. <p>Show the description in <code>npm search</code></p>
  266. <h3 id="dev">dev</h3>
  267. <ul>
  268. <li>Default: false</li>
  269. <li>Type: Boolean</li>
  270. </ul>
  271. <p>Install <code>dev-dependencies</code> along with packages.</p>
  272. <h3 id="dry-run">dry-run</h3>
  273. <ul>
  274. <li>Default: false</li>
  275. <li>Type: Boolean</li>
  276. </ul>
  277. <p>Indicates that you don&#39;t want npm to make any changes and that it should
  278. only report what it would have done. This can be passed into any of the
  279. commands that modify your local installation, eg, <code>install</code>, <code>update</code>,
  280. <code>dedupe</code>, <code>uninstall</code>. This is NOT currently honored by some network related
  281. commands, eg <code>dist-tags</code>, <code>owner</code>, etc.</p>
  282. <h3 id="editor">editor</h3>
  283. <ul>
  284. <li>Default: <code>EDITOR</code> environment variable if set, or <code>&quot;vi&quot;</code> on Posix,
  285. or <code>&quot;notepad&quot;</code> on Windows.</li>
  286. <li>Type: path</li>
  287. </ul>
  288. <p>The command to run for <code>npm edit</code> or <code>npm config edit</code>.</p>
  289. <h3 id="engine-strict">engine-strict</h3>
  290. <ul>
  291. <li>Default: false</li>
  292. <li>Type: Boolean</li>
  293. </ul>
  294. <p>If set to true, then npm will stubbornly refuse to install (or even
  295. consider installing) any package that claims to not be compatible with
  296. the current Node.js version.</p>
  297. <h3 id="force">force</h3>
  298. <ul>
  299. <li>Default: false</li>
  300. <li>Type: Boolean</li>
  301. </ul>
  302. <p>Makes various commands more forceful.</p>
  303. <ul>
  304. <li>lifecycle script failure does not block progress.</li>
  305. <li>publishing clobbers previously published versions.</li>
  306. <li>skips cache when requesting from the registry.</li>
  307. <li>prevents checks against clobbering non-npm files.</li>
  308. </ul>
  309. <h3 id="fetch-retries">fetch-retries</h3>
  310. <ul>
  311. <li>Default: 2</li>
  312. <li>Type: Number</li>
  313. </ul>
  314. <p>The &quot;retries&quot; config for the <code>retry</code> module to use when fetching
  315. packages from the registry.</p>
  316. <h3 id="fetch-retry-factor">fetch-retry-factor</h3>
  317. <ul>
  318. <li>Default: 10</li>
  319. <li>Type: Number</li>
  320. </ul>
  321. <p>The &quot;factor&quot; config for the <code>retry</code> module to use when fetching
  322. packages.</p>
  323. <h3 id="fetch-retry-mintimeout">fetch-retry-mintimeout</h3>
  324. <ul>
  325. <li>Default: 10000 (10 seconds)</li>
  326. <li>Type: Number</li>
  327. </ul>
  328. <p>The &quot;minTimeout&quot; config for the <code>retry</code> module to use when fetching
  329. packages.</p>
  330. <h3 id="fetch-retry-maxtimeout">fetch-retry-maxtimeout</h3>
  331. <ul>
  332. <li>Default: 60000 (1 minute)</li>
  333. <li>Type: Number</li>
  334. </ul>
  335. <p>The &quot;maxTimeout&quot; config for the <code>retry</code> module to use when fetching
  336. packages.</p>
  337. <h3 id="git">git</h3>
  338. <ul>
  339. <li>Default: <code>&quot;git&quot;</code></li>
  340. <li>Type: String</li>
  341. </ul>
  342. <p>The command to use for git commands. If git is installed on the
  343. computer, but is not in the <code>PATH</code>, then set this to the full path to
  344. the git binary.</p>
  345. <h3 id="git-tag-version">git-tag-version</h3>
  346. <ul>
  347. <li>Default: <code>true</code></li>
  348. <li>Type: Boolean</li>
  349. </ul>
  350. <p>Tag the commit when using the <code>npm version</code> command.</p>
  351. <h3 id="commit-hooks">commit-hooks</h3>
  352. <ul>
  353. <li>Default: <code>true</code></li>
  354. <li>Type: Boolean</li>
  355. </ul>
  356. <p>Run git commit hooks when using the <code>npm version</code> command.</p>
  357. <h3 id="global">global</h3>
  358. <ul>
  359. <li>Default: false</li>
  360. <li>Type: Boolean</li>
  361. </ul>
  362. <p>Operates in &quot;global&quot; mode, so that packages are installed into the
  363. <code>prefix</code> folder instead of the current working directory. See
  364. <code><a href="../files/npm-folders.html">npm-folders(5)</a></code> for more on the differences in behavior.</p>
  365. <ul>
  366. <li>packages are installed into the <code>{prefix}/lib/node_modules</code> folder, instead of the
  367. current working directory.</li>
  368. <li>bin files are linked to <code>{prefix}/bin</code></li>
  369. <li>man pages are linked to <code>{prefix}/share/man</code></li>
  370. </ul>
  371. <h3 id="globalconfig">globalconfig</h3>
  372. <ul>
  373. <li>Default: {prefix}/etc/npmrc</li>
  374. <li>Type: path</li>
  375. </ul>
  376. <p>The config file to read for global config options.</p>
  377. <h3 id="global-style">global-style</h3>
  378. <ul>
  379. <li>Default: false</li>
  380. <li>Type: Boolean</li>
  381. </ul>
  382. <p>Causes npm to install the package into your local <code>node_modules</code> folder with
  383. the same layout it uses with the global <code>node_modules</code> folder. Only your
  384. direct dependencies will show in <code>node_modules</code> and everything they depend
  385. on will be flattened in their <code>node_modules</code> folders. This obviously will
  386. eliminate some deduping. If used with <code>legacy-bundling</code>, <code>legacy-bundling</code> will be
  387. preferred.</p>
  388. <h3 id="group">group</h3>
  389. <ul>
  390. <li>Default: GID of the current process</li>
  391. <li>Type: String or Number</li>
  392. </ul>
  393. <p>The group to use when running package scripts in global mode as the root
  394. user.</p>
  395. <h3 id="heading">heading</h3>
  396. <ul>
  397. <li>Default: <code>&quot;npm&quot;</code></li>
  398. <li>Type: String</li>
  399. </ul>
  400. <p>The string that starts all the debugging log output.</p>
  401. <h3 id="https-proxy">https-proxy</h3>
  402. <ul>
  403. <li>Default: null</li>
  404. <li>Type: url</li>
  405. </ul>
  406. <p>A proxy to use for outgoing https requests. If the <code>HTTPS_PROXY</code> or
  407. <code>https_proxy</code> or <code>HTTP_PROXY</code> or <code>http_proxy</code> environment variables are set,
  408. proxy settings will be honored by the underlying <code>request</code> library.</p>
  409. <h3 id="if-present">if-present</h3>
  410. <ul>
  411. <li>Default: false</li>
  412. <li>Type: Boolean</li>
  413. </ul>
  414. <p>If true, npm will not exit with an error code when <code>run-script</code> is invoked for
  415. a script that isn&#39;t defined in the <code>scripts</code> section of <code>package.json</code>. This
  416. option can be used when it&#39;s desirable to optionally run a script when it&#39;s
  417. present and fail if the script fails. This is useful, for example, when running
  418. scripts that may only apply for some builds in an otherwise generic CI setup.</p>
  419. <h3 id="ignore-prepublish">ignore-prepublish</h3>
  420. <ul>
  421. <li>Default: false</li>
  422. <li>Type: Boolean</li>
  423. </ul>
  424. <p>If true, npm will not run <code>prepublish</code> scripts.</p>
  425. <h3 id="ignore-scripts">ignore-scripts</h3>
  426. <ul>
  427. <li>Default: false</li>
  428. <li>Type: Boolean</li>
  429. </ul>
  430. <p>If true, npm does not run scripts specified in package.json files.</p>
  431. <h3 id="init-module">init-module</h3>
  432. <ul>
  433. <li>Default: ~/.npm-init.js</li>
  434. <li>Type: path</li>
  435. </ul>
  436. <p>A module that will be loaded by the <code>npm init</code> command. See the
  437. documentation for the
  438. <a href="https://github.com/isaacs/init-package-json">init-package-json</a> module
  439. for more information, or <a href="../cli/npm-init.html">npm-init(1)</a>.</p>
  440. <h3 id="init-author-name">init-author-name</h3>
  441. <ul>
  442. <li>Default: &quot;&quot;</li>
  443. <li>Type: String</li>
  444. </ul>
  445. <p>The value <code>npm init</code> should use by default for the package author&#39;s name.</p>
  446. <h3 id="init-author-email">init-author-email</h3>
  447. <ul>
  448. <li>Default: &quot;&quot;</li>
  449. <li>Type: String</li>
  450. </ul>
  451. <p>The value <code>npm init</code> should use by default for the package author&#39;s email.</p>
  452. <h3 id="init-author-url">init-author-url</h3>
  453. <ul>
  454. <li>Default: &quot;&quot;</li>
  455. <li>Type: String</li>
  456. </ul>
  457. <p>The value <code>npm init</code> should use by default for the package author&#39;s homepage.</p>
  458. <h3 id="init-license">init-license</h3>
  459. <ul>
  460. <li>Default: &quot;ISC&quot;</li>
  461. <li>Type: String</li>
  462. </ul>
  463. <p>The value <code>npm init</code> should use by default for the package license.</p>
  464. <h3 id="init-version">init-version</h3>
  465. <ul>
  466. <li>Default: &quot;1.0.0&quot;</li>
  467. <li>Type: semver</li>
  468. </ul>
  469. <p>The value that <code>npm init</code> should use by default for the package
  470. version number, if not already set in package.json.</p>
  471. <h3 id="json">json</h3>
  472. <ul>
  473. <li>Default: false</li>
  474. <li>Type: Boolean</li>
  475. </ul>
  476. <p>Whether or not to output JSON data, rather than the normal output.</p>
  477. <p>This feature is currently experimental, and the output data structures for many
  478. commands is either not implemented in JSON yet, or subject to change. Only the
  479. output from <code>npm ls --json</code> and <code>npm search --json</code> are currently valid.</p>
  480. <h3 id="key">key</h3>
  481. <ul>
  482. <li>Default: <code>null</code></li>
  483. <li>Type: String</li>
  484. </ul>
  485. <p>A client key to pass when accessing the registry. Values should be in PEM
  486. format with newlines replaced by the string &quot;\n&quot;. For example:</p>
  487. <pre><code>key=&quot;-----BEGIN PRIVATE KEY-----\nXXXX\nXXXX\n-----END PRIVATE KEY-----&quot;</code></pre><p>It is <em>not</em> the path to a key file (and there is no &quot;keyfile&quot; option).</p>
  488. <h3 id="legacy-bundling">legacy-bundling</h3>
  489. <ul>
  490. <li>Default: false</li>
  491. <li>Type: Boolean</li>
  492. </ul>
  493. <p>Causes npm to install the package such that versions of npm prior to 1.4,
  494. such as the one included with node 0.8, can install the package. This
  495. eliminates all automatic deduping. If used with <code>global-style</code> this option
  496. will be preferred.</p>
  497. <h3 id="link">link</h3>
  498. <ul>
  499. <li>Default: false</li>
  500. <li>Type: Boolean</li>
  501. </ul>
  502. <p>If true, then local installs will link if there is a suitable globally
  503. installed package.</p>
  504. <p>Note that this means that local installs can cause things to be
  505. installed into the global space at the same time. The link is only done
  506. if one of the two conditions are met:</p>
  507. <ul>
  508. <li>The package is not already installed globally, or</li>
  509. <li>the globally installed version is identical to the version that is
  510. being installed locally.</li>
  511. </ul>
  512. <h3 id="local-address">local-address</h3>
  513. <ul>
  514. <li>Default: undefined</li>
  515. <li>Type: IP Address</li>
  516. </ul>
  517. <p>The IP address of the local interface to use when making connections
  518. to the npm registry. Must be IPv4 in versions of Node prior to 0.12.</p>
  519. <h3 id="loglevel">loglevel</h3>
  520. <ul>
  521. <li>Default: &quot;notice&quot;</li>
  522. <li>Type: String</li>
  523. <li>Values: &quot;silent&quot;, &quot;error&quot;, &quot;warn&quot;, &quot;notice&quot;, &quot;http&quot;, &quot;timing&quot;, &quot;info&quot;,
  524. &quot;verbose&quot;, &quot;silly&quot;</li>
  525. </ul>
  526. <p>What level of logs to report. On failure, <em>all</em> logs are written to
  527. <code>npm-debug.log</code> in the current working directory.</p>
  528. <p>Any logs of a higher level than the setting are shown. The default is &quot;notice&quot;.</p>
  529. <h3 id="logstream">logstream</h3>
  530. <ul>
  531. <li>Default: process.stderr</li>
  532. <li>Type: Stream</li>
  533. </ul>
  534. <p>This is the stream that is passed to the
  535. <a href="https://github.com/npm/npmlog">npmlog</a> module at run time.</p>
  536. <p>It cannot be set from the command line, but if you are using npm
  537. programmatically, you may wish to send logs to somewhere other than
  538. stderr.</p>
  539. <p>If the <code>color</code> config is set to true, then this stream will receive
  540. colored output if it is a TTY.</p>
  541. <h3 id="logs-max">logs-max</h3>
  542. <ul>
  543. <li>Default: 10</li>
  544. <li>Type: Number</li>
  545. </ul>
  546. <p>The maximum number of log files to store.</p>
  547. <h3 id="long">long</h3>
  548. <ul>
  549. <li>Default: false</li>
  550. <li>Type: Boolean</li>
  551. </ul>
  552. <p>Show extended information in <code>npm ls</code> and <code>npm search</code>.</p>
  553. <h3 id="maxsockets">maxsockets</h3>
  554. <ul>
  555. <li>Default: 50</li>
  556. <li>Type: Number</li>
  557. </ul>
  558. <p>The maximum number of connections to use per origin (protocol/host/port
  559. combination). Passed to the <code>http</code> <code>Agent</code> used to make the request.</p>
  560. <h3 id="message">message</h3>
  561. <ul>
  562. <li>Default: &quot;%s&quot;</li>
  563. <li>Type: String</li>
  564. </ul>
  565. <p>Commit message which is used by <code>npm version</code> when creating version commit.</p>
  566. <p>Any &quot;%s&quot; in the message will be replaced with the version number.</p>
  567. <h3 id="metrics-registry">metrics-registry</h3>
  568. <ul>
  569. <li>Default: The value of <code>registry</code> (which defaults to &quot;<a href="https://registry.npmjs.org/&quot;">https://registry.npmjs.org/&quot;</a>)</li>
  570. <li>Type: String</li>
  571. </ul>
  572. <p>The registry you want to send cli metrics to if <code>send-metrics</code> is true.</p>
  573. <h3 id="node-options">node-options</h3>
  574. <ul>
  575. <li>Default: null</li>
  576. <li>Type: String</li>
  577. </ul>
  578. <p>Options to pass through to Node.js via the <code>NODE_OPTIONS</code> environment
  579. variable. This does not impact how npm itself is executed but it does
  580. impact how lifecycle scripts are called.</p>
  581. <h3 id="node-version">node-version</h3>
  582. <ul>
  583. <li>Default: process.version</li>
  584. <li>Type: semver or false</li>
  585. </ul>
  586. <p>The node version to use when checking a package&#39;s <code>engines</code> map.</p>
  587. <h3 id="noproxy">noproxy</h3>
  588. <ul>
  589. <li>Default: null</li>
  590. <li>Type: String or Array</li>
  591. </ul>
  592. <p>A comma-separated string or an array of domain extensions that a proxy should not be used for.</p>
  593. <h3 id="offline">offline</h3>
  594. <ul>
  595. <li>Default: false</li>
  596. <li>Type: Boolean</li>
  597. </ul>
  598. <p>Force offline mode: no network requests will be done during install. To allow
  599. the CLI to fill in missing cache data, see <code>--prefer-offline</code>.</p>
  600. <h3 id="onload-script">onload-script</h3>
  601. <ul>
  602. <li>Default: false</li>
  603. <li>Type: path</li>
  604. </ul>
  605. <p>A node module to <code>require()</code> when npm loads. Useful for programmatic
  606. usage.</p>
  607. <h3 id="only">only</h3>
  608. <ul>
  609. <li>Default: null</li>
  610. <li>Type: String</li>
  611. </ul>
  612. <p>When &quot;dev&quot; or &quot;development&quot; and running local <code>npm install</code> without any
  613. arguments, only devDependencies (and their dependencies) are installed.</p>
  614. <p>When &quot;dev&quot; or &quot;development&quot; and running local <code>npm ls</code>, <code>npm outdated</code>, or
  615. <code>npm update</code>, is an alias for <code>--dev</code>.</p>
  616. <p>When &quot;prod&quot; or &quot;production&quot; and running local <code>npm install</code> without any
  617. arguments, only non-devDependencies (and their dependencies) are
  618. installed.</p>
  619. <p>When &quot;prod&quot; or &quot;production&quot; and running local <code>npm ls</code>, <code>npm outdated</code>, or
  620. <code>npm update</code>, is an alias for <code>--production</code>.</p>
  621. <h3 id="optional">optional</h3>
  622. <ul>
  623. <li>Default: true</li>
  624. <li>Type: Boolean</li>
  625. </ul>
  626. <p>Attempt to install packages in the <code>optionalDependencies</code> object. Note
  627. that if these packages fail to install, the overall installation
  628. process is not aborted.</p>
  629. <h3 id="otp">otp</h3>
  630. <ul>
  631. <li>Default: null</li>
  632. <li>Type: Number</li>
  633. </ul>
  634. <p>This is a one-time password from a two-factor authenticator. It&#39;s needed
  635. when publishing or changing package permissions with <code>npm access</code>.</p>
  636. <h3 id="package-lock">package-lock</h3>
  637. <ul>
  638. <li>Default: true</li>
  639. <li>Type: Boolean</li>
  640. </ul>
  641. <p>If set to false, then ignore <code>package-lock.json</code> files when installing. This
  642. will also prevent <em>writing</em> <code>package-lock.json</code> if <code>save</code> is true.</p>
  643. <p>When package package-locks are disabled, automatic pruning of extraneous
  644. modules will also be disabled. To remove extraneous modules with
  645. package-locks disabled use <code>npm prune</code>.</p>
  646. <p>This option is an alias for <code>--shrinkwrap</code>.</p>
  647. <h3 id="package-lock-only">package-lock-only</h3>
  648. <ul>
  649. <li>Default: false</li>
  650. <li>Type: Boolean</li>
  651. </ul>
  652. <p>If set to true, it will update only the <code>package-lock.json</code>,
  653. instead of checking <code>node_modules</code> and downloading dependencies.</p>
  654. <h3 id="parseable">parseable</h3>
  655. <ul>
  656. <li>Default: false</li>
  657. <li>Type: Boolean</li>
  658. </ul>
  659. <p>Output parseable results from commands that write to
  660. standard output. For <code>npm search</code>, this will be tab-separated table format.</p>
  661. <h3 id="prefer-offline">prefer-offline</h3>
  662. <ul>
  663. <li>Default: false</li>
  664. <li>Type: Boolean</li>
  665. </ul>
  666. <p>If true, staleness checks for cached data will be bypassed, but missing data
  667. will be requested from the server. To force full offline mode, use <code>--offline</code>.</p>
  668. <p>This option is effectively equivalent to <code>--cache-min=9999999</code>.</p>
  669. <h3 id="prefer-online">prefer-online</h3>
  670. <ul>
  671. <li>Default: false</li>
  672. <li>Type: Boolean</li>
  673. </ul>
  674. <p>If true, staleness checks for cached data will be forced, making the CLI look
  675. for updates immediately even for fresh package data.</p>
  676. <h3 id="prefix">prefix</h3>
  677. <ul>
  678. <li>Default: see <a href="../files/npm-folders.html">npm-folders(5)</a></li>
  679. <li>Type: path</li>
  680. </ul>
  681. <p>The location to install global items. If set on the command line, then
  682. it forces non-global commands to run in the specified folder.</p>
  683. <h3 id="preid">preid</h3>
  684. <ul>
  685. <li>Default: &quot;&quot;</li>
  686. <li>Type: String</li>
  687. </ul>
  688. <p>The &quot;prerelease identifier&quot; to use as a prefix for the &quot;prerelease&quot; part of a
  689. semver. Like the <code>rc</code> in <code>1.2.0-rc.8</code>.</p>
  690. <h3 id="production">production</h3>
  691. <ul>
  692. <li>Default: false</li>
  693. <li>Type: Boolean</li>
  694. </ul>
  695. <p>Set to true to run in &quot;production&quot; mode.</p>
  696. <ol>
  697. <li>devDependencies are not installed at the topmost level when running
  698. local <code>npm install</code> without any arguments.</li>
  699. <li>Set the NODE_ENV=&quot;production&quot; for lifecycle scripts.</li>
  700. </ol>
  701. <h3 id="progress">progress</h3>
  702. <ul>
  703. <li>Default: true, unless TRAVIS or CI env vars set.</li>
  704. <li>Type: Boolean</li>
  705. </ul>
  706. <p>When set to <code>true</code>, npm will display a progress bar during time intensive
  707. operations, if <code>process.stderr</code> is a TTY.</p>
  708. <p>Set to <code>false</code> to suppress the progress bar.</p>
  709. <h3 id="proxy">proxy</h3>
  710. <ul>
  711. <li>Default: null</li>
  712. <li>Type: url</li>
  713. </ul>
  714. <p>A proxy to use for outgoing http requests. If the <code>HTTP_PROXY</code> or
  715. <code>http_proxy</code> environment variables are set, proxy settings will be
  716. honored by the underlying <code>request</code> library.</p>
  717. <h3 id="read-only">read-only</h3>
  718. <ul>
  719. <li>Default: false</li>
  720. <li>Type: Boolean</li>
  721. </ul>
  722. <p>This is used to mark a token as unable to publish when configuring limited access tokens with the <code>npm token create</code> command.</p>
  723. <h3 id="rebuild-bundle">rebuild-bundle</h3>
  724. <ul>
  725. <li>Default: true</li>
  726. <li>Type: Boolean</li>
  727. </ul>
  728. <p>Rebuild bundled dependencies after installation.</p>
  729. <h3 id="registry">registry</h3>
  730. <ul>
  731. <li>Default: <a href="https://registry.npmjs.org/">https://registry.npmjs.org/</a></li>
  732. <li>Type: url</li>
  733. </ul>
  734. <p>The base URL of the npm package registry.</p>
  735. <h3 id="rollback">rollback</h3>
  736. <ul>
  737. <li>Default: true</li>
  738. <li>Type: Boolean</li>
  739. </ul>
  740. <p>Remove failed installs.</p>
  741. <h3 id="save">save</h3>
  742. <ul>
  743. <li>Default: true</li>
  744. <li>Type: Boolean</li>
  745. </ul>
  746. <p>Save installed packages to a package.json file as dependencies.</p>
  747. <p>When used with the <code>npm rm</code> command, it removes it from the <code>dependencies</code>
  748. object.</p>
  749. <p>Only works if there is already a package.json file present.</p>
  750. <h3 id="save-bundle">save-bundle</h3>
  751. <ul>
  752. <li>Default: false</li>
  753. <li>Type: Boolean</li>
  754. </ul>
  755. <p>If a package would be saved at install time by the use of <code>--save</code>,
  756. <code>--save-dev</code>, or <code>--save-optional</code>, then also put it in the
  757. <code>bundleDependencies</code> list.</p>
  758. <p>When used with the <code>npm rm</code> command, it removes it from the
  759. bundledDependencies list.</p>
  760. <h3 id="save-prod">save-prod</h3>
  761. <ul>
  762. <li>Default: false</li>
  763. <li>Type: Boolean</li>
  764. </ul>
  765. <p>Makes sure that a package will be saved into <code>dependencies</code> specifically. This
  766. is useful if a package already exists in <code>devDependencies</code> or
  767. <code>optionalDependencies</code>, but you want to move it to be a production dep. This is
  768. also the default behavior if <code>--save</code> is true, and neither <code>--save-dev</code> or
  769. <code>--save-optional</code> are true.</p>
  770. <h3 id="save-dev">save-dev</h3>
  771. <ul>
  772. <li>Default: false</li>
  773. <li>Type: Boolean</li>
  774. </ul>
  775. <p>Save installed packages to a package.json file as <code>devDependencies</code>.</p>
  776. <p>When used with the <code>npm rm</code> command, it removes it from the
  777. <code>devDependencies</code> object.</p>
  778. <p>Only works if there is already a package.json file present.</p>
  779. <h3 id="save-exact">save-exact</h3>
  780. <ul>
  781. <li>Default: false</li>
  782. <li>Type: Boolean</li>
  783. </ul>
  784. <p>Dependencies saved to package.json using <code>--save</code>, <code>--save-dev</code> or
  785. <code>--save-optional</code> will be configured with an exact version rather than
  786. using npm&#39;s default semver range operator.</p>
  787. <h3 id="save-optional">save-optional</h3>
  788. <ul>
  789. <li>Default: false</li>
  790. <li>Type: Boolean</li>
  791. </ul>
  792. <p>Save installed packages to a package.json file as
  793. optionalDependencies.</p>
  794. <p>When used with the <code>npm rm</code> command, it removes it from the
  795. <code>devDependencies</code> object.</p>
  796. <p>Only works if there is already a package.json file present.</p>
  797. <h3 id="save-prefix">save-prefix</h3>
  798. <ul>
  799. <li>Default: &#39;^&#39;</li>
  800. <li>Type: String</li>
  801. </ul>
  802. <p>Configure how versions of packages installed to a package.json file via
  803. <code>--save</code> or <code>--save-dev</code> get prefixed.</p>
  804. <p>For example if a package has version <code>1.2.3</code>, by default its version is
  805. set to <code>^1.2.3</code> which allows minor upgrades for that package, but after
  806. <code>npm config set save-prefix=&#39;~&#39;</code> it would be set to <code>~1.2.3</code> which only allows
  807. patch upgrades.</p>
  808. <h3 id="scope">scope</h3>
  809. <ul>
  810. <li>Default: the scope of the current project, if any, or &quot;&quot;</li>
  811. <li>Type: String</li>
  812. </ul>
  813. <p>Associate an operation with a scope for a scoped registry. Useful when logging
  814. in to a private registry for the first time:
  815. <code>npm login --scope=@organization --registry=registry.organization.com</code>, which
  816. will cause <code>@organization</code> to be mapped to the registry for future installation
  817. of packages specified according to the pattern <code>@organization/package</code>.</p>
  818. <h3 id="script-shell">script-shell</h3>
  819. <ul>
  820. <li>Default: <code>null</code></li>
  821. <li>Type: path</li>
  822. </ul>
  823. <p>The shell to use for scripts run with the <code>npm run</code> command.</p>
  824. <h3 id="scripts-prepend-node-path">scripts-prepend-node-path</h3>
  825. <ul>
  826. <li>Default: &quot;warn-only&quot;</li>
  827. <li>Type: Boolean, <code>&quot;auto&quot;</code> or <code>&quot;warn-only&quot;</code></li>
  828. </ul>
  829. <p>If set to <code>true</code>, add the directory in which the current <code>node</code> executable
  830. resides to the <code>PATH</code> environment variable when running scripts,
  831. even if that means that <code>npm</code> will invoke a different <code>node</code> executable than
  832. the one which it is running.</p>
  833. <p>If set to <code>false</code>, never modify <code>PATH</code> with that.</p>
  834. <p>If set to <code>&quot;warn-only&quot;</code>, never modify <code>PATH</code> but print a warning if <code>npm</code> thinks
  835. that you may want to run it with <code>true</code>, e.g. because the <code>node</code> executable
  836. in the <code>PATH</code> is not the one <code>npm</code> was invoked with.</p>
  837. <p>If set to <code>auto</code>, only add that directory to the <code>PATH</code> environment variable
  838. if the <code>node</code> executable with which <code>npm</code> was invoked and the one that is found
  839. first on the <code>PATH</code> are different.</p>
  840. <h3 id="searchexclude">searchexclude</h3>
  841. <ul>
  842. <li>Default: &quot;&quot;</li>
  843. <li>Type: String</li>
  844. </ul>
  845. <p>Space-separated options that limit the results from search.</p>
  846. <h3 id="searchopts">searchopts</h3>
  847. <ul>
  848. <li>Default: &quot;&quot;</li>
  849. <li>Type: String</li>
  850. </ul>
  851. <p>Space-separated options that are always passed to search.</p>
  852. <h3 id="searchlimit">searchlimit</h3>
  853. <ul>
  854. <li>Default: 20</li>
  855. <li>Type: Number</li>
  856. </ul>
  857. <p>Number of items to limit search results to. Will not apply at all to legacy
  858. searches.</p>
  859. <h3 id="searchstaleness">searchstaleness</h3>
  860. <ul>
  861. <li>Default: 900 (15 minutes)</li>
  862. <li>Type: Number</li>
  863. </ul>
  864. <p>The age of the cache, in seconds, before another registry request is made if
  865. using legacy search endpoint.</p>
  866. <h3 id="send-metrics">send-metrics</h3>
  867. <ul>
  868. <li>Default: false</li>
  869. <li>Type: Boolean</li>
  870. </ul>
  871. <p>If true, success/failure metrics will be reported to the registry stored in
  872. <code>metrics-registry</code>. These requests contain the number of successful and
  873. failing runs of the npm CLI and the time period overwhich those counts were
  874. gathered. No identifying information is included in these requests.</p>
  875. <h3 id="shell">shell</h3>
  876. <ul>
  877. <li>Default: SHELL environment variable, or &quot;bash&quot; on Posix, or &quot;cmd&quot; on
  878. Windows</li>
  879. <li>Type: path</li>
  880. </ul>
  881. <p>The shell to run for the <code>npm explore</code> command.</p>
  882. <h3 id="shrinkwrap">shrinkwrap</h3>
  883. <ul>
  884. <li>Default: true</li>
  885. <li>Type: Boolean</li>
  886. </ul>
  887. <p>If set to false, then ignore <code>npm-shrinkwrap.json</code> files when installing. This
  888. will also prevent <em>writing</em> <code>npm-shrinkwrap.json</code> if <code>save</code> is true.</p>
  889. <p>This option is an alias for <code>--package-lock</code>.</p>
  890. <h3 id="sign-git-commit">sign-git-commit</h3>
  891. <ul>
  892. <li>Default: false</li>
  893. <li>Type: Boolean</li>
  894. </ul>
  895. <p>If set to true, then the <code>npm version</code> command will commit the new package
  896. version using <code>-S</code> to add a signature.</p>
  897. <p>Note that git requires you to have set up GPG keys in your git configs
  898. for this to work properly.</p>
  899. <h3 id="sign-git-tag">sign-git-tag</h3>
  900. <ul>
  901. <li>Default: false</li>
  902. <li>Type: Boolean</li>
  903. </ul>
  904. <p>If set to true, then the <code>npm version</code> command will tag the version
  905. using <code>-s</code> to add a signature.</p>
  906. <p>Note that git requires you to have set up GPG keys in your git configs
  907. for this to work properly.</p>
  908. <h3 id="sso-poll-frequency">sso-poll-frequency</h3>
  909. <ul>
  910. <li>Default: 500</li>
  911. <li>Type: Number</li>
  912. </ul>
  913. <p>When used with SSO-enabled <code>auth-type</code>s, configures how regularly the registry
  914. should be polled while the user is completing authentication.</p>
  915. <h3 id="sso-type">sso-type</h3>
  916. <ul>
  917. <li>Default: &#39;oauth&#39;</li>
  918. <li>Type: &#39;oauth&#39;, &#39;saml&#39;, or null</li>
  919. </ul>
  920. <p>If <code>--auth-type=sso</code>, the type of SSO type to use.</p>
  921. <h3 id="strict-ssl">strict-ssl</h3>
  922. <ul>
  923. <li>Default: true</li>
  924. <li>Type: Boolean</li>
  925. </ul>
  926. <p>Whether or not to do SSL key validation when making requests to the
  927. registry via https.</p>
  928. <p>See also the <code>ca</code> config.</p>
  929. <h3 id="tag">tag</h3>
  930. <ul>
  931. <li>Default: latest</li>
  932. <li>Type: String</li>
  933. </ul>
  934. <p>If you ask npm to install a package and don&#39;t tell it a specific version, then
  935. it will install the specified tag.</p>
  936. <p>Also the tag that is added to the package@version specified by the <code>npm
  937. tag</code> command, if no explicit tag is given.</p>
  938. <h3 id="tag-version-prefix">tag-version-prefix</h3>
  939. <ul>
  940. <li>Default: <code>&quot;v&quot;</code></li>
  941. <li>Type: String</li>
  942. </ul>
  943. <p>If set, alters the prefix used when tagging a new version when performing a
  944. version increment using <code>npm-version</code>. To remove the prefix altogether, set it
  945. to the empty string: <code>&quot;&quot;</code>.</p>
  946. <p>Because other tools may rely on the convention that npm version tags look like
  947. <code>v1.0.0</code>, <em>only use this property if it is absolutely necessary</em>. In
  948. particular, use care when overriding this setting for public packages.</p>
  949. <h3 id="timing">timing</h3>
  950. <ul>
  951. <li>Default: <code>false</code></li>
  952. <li>Type: Boolean</li>
  953. </ul>
  954. <p>If true, writes an <code>npm-debug</code> log to <code>_logs</code> and timing information to
  955. <code>_timing.json</code>, both in your cache. <code>_timing.json</code> is a newline delimited
  956. list of JSON objects. You can quickly view it with this
  957. <a href="https://www.npmjs.com/package/json">json</a> command line:
  958. <code>json -g &lt; ~/.npm/_timing.json</code>.</p>
  959. <h3 id="tmp">tmp</h3>
  960. <ul>
  961. <li>Default: TMPDIR environment variable, or &quot;/tmp&quot;</li>
  962. <li>Type: path</li>
  963. </ul>
  964. <p>Where to store temporary files and folders. All temp files are deleted
  965. on success, but left behind on failure for forensic purposes.</p>
  966. <h3 id="unicode">unicode</h3>
  967. <ul>
  968. <li>Default: false on windows, true on mac/unix systems with a unicode locale</li>
  969. <li>Type: Boolean</li>
  970. </ul>
  971. <p>When set to true, npm uses unicode characters in the tree output. When
  972. false, it uses ascii characters to draw trees.</p>
  973. <h3 id="unsafe-perm">unsafe-perm</h3>
  974. <ul>
  975. <li>Default: false if running as root, true otherwise</li>
  976. <li>Type: Boolean</li>
  977. </ul>
  978. <p>Set to true to suppress the UID/GID switching when running package
  979. scripts. If set explicitly to false, then installing as a non-root user
  980. will fail.</p>
  981. <h3 id="update-notifier">update-notifier</h3>
  982. <ul>
  983. <li>Default: true</li>
  984. <li>Type: Boolean</li>
  985. </ul>
  986. <p>Set to false to suppress the update notification when using an older
  987. version of npm than the latest.</p>
  988. <h3 id="usage">usage</h3>
  989. <ul>
  990. <li>Default: false</li>
  991. <li>Type: Boolean</li>
  992. </ul>
  993. <p>Set to show short usage output (like the -H output)
  994. instead of complete help when doing <code><a href="../cli/npm-help.html">npm-help(1)</a></code>.</p>
  995. <h3 id="user">user</h3>
  996. <ul>
  997. <li>Default: &quot;nobody&quot;</li>
  998. <li>Type: String or Number</li>
  999. </ul>
  1000. <p>The UID to set to when running package scripts as root.</p>
  1001. <h3 id="userconfig">userconfig</h3>
  1002. <ul>
  1003. <li>Default: ~/.npmrc</li>
  1004. <li>Type: path</li>
  1005. </ul>
  1006. <p>The location of user-level configuration settings.</p>
  1007. <h3 id="umask">umask</h3>
  1008. <ul>
  1009. <li>Default: 022</li>
  1010. <li>Type: Octal numeric string in range 0000..0777 (0..511)</li>
  1011. </ul>
  1012. <p>The &quot;umask&quot; value to use when setting the file creation mode on files
  1013. and folders.</p>
  1014. <p>Folders and executables are given a mode which is <code>0777</code> masked against
  1015. this value. Other files are given a mode which is <code>0666</code> masked against
  1016. this value. Thus, the defaults are <code>0755</code> and <code>0644</code> respectively.</p>
  1017. <h3 id="user-agent">user-agent</h3>
  1018. <ul>
  1019. <li>Default: node/{process.version} {process.platform} {process.arch}</li>
  1020. <li>Type: String</li>
  1021. </ul>
  1022. <p>Sets a User-Agent to the request header</p>
  1023. <h3 id="version">version</h3>
  1024. <ul>
  1025. <li>Default: false</li>
  1026. <li>Type: boolean</li>
  1027. </ul>
  1028. <p>If true, output the npm version and exit successfully.</p>
  1029. <p>Only relevant when specified explicitly on the command line.</p>
  1030. <h3 id="versions">versions</h3>
  1031. <ul>
  1032. <li>Default: false</li>
  1033. <li>Type: boolean</li>
  1034. </ul>
  1035. <p>If true, output the npm version as well as node&#39;s <code>process.versions</code> map, and
  1036. exit successfully.</p>
  1037. <p>Only relevant when specified explicitly on the command line.</p>
  1038. <h3 id="viewer">viewer</h3>
  1039. <ul>
  1040. <li>Default: &quot;man&quot; on Posix, &quot;browser&quot; on Windows</li>
  1041. <li>Type: path</li>
  1042. </ul>
  1043. <p>The program to use to view help content.</p>
  1044. <p>Set to <code>&quot;browser&quot;</code> to view html help content in the default web browser.</p>
  1045. <h2 id="see-also">SEE ALSO</h2>
  1046. <ul>
  1047. <li><a href="../cli/npm-config.html">npm-config(1)</a></li>
  1048. <li><a href="../files/npmrc.html">npmrc(5)</a></li>
  1049. <li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li>
  1050. <li><a href="../files/npm-folders.html">npm-folders(5)</a></li>
  1051. <li><a href="../cli/npm.html">npm(1)</a></li>
  1052. </ul>
  1053. </div>
  1054. <table border=0 cellspacing=0 cellpadding=0 id=npmlogo>
  1055. <tr><td style="width:180px;height:10px;background:rgb(237,127,127)" colspan=18>&nbsp;</td></tr>
  1056. <tr><td rowspan=4 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td><td style="width:40px;height:10px;background:#fff" colspan=4>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=4>&nbsp;</td><td style="width:40px;height:10px;background:#fff" colspan=4>&nbsp;</td><td rowspan=4 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td><td colspan=6 style="width:60px;height:10px;background:#fff">&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=4>&nbsp;</td></tr>
  1057. <tr><td colspan=2 style="width:20px;height:30px;background:#fff" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:#fff" rowspan=3>&nbsp;</td><td style="width:20px;height:10px;background:#fff" rowspan=4 colspan=2>&nbsp;</td><td style="width:10px;height:20px;background:rgb(237,127,127)" rowspan=2>&nbsp;</td><td style="width:10px;height:10px;background:#fff" rowspan=3>&nbsp;</td><td style="width:20px;height:10px;background:#fff" rowspan=3 colspan=2>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:#fff" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3>&nbsp;</td></tr>
  1058. <tr><td style="width:10px;height:10px;background:#fff" rowspan=2>&nbsp;</td></tr>
  1059. <tr><td style="width:10px;height:10px;background:#fff">&nbsp;</td></tr>
  1060. <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
  1061. <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
  1062. </table>
  1063. <p id="footer">npm-config &mdash; npm@6.4.1</p>