• Home
  • Raw
  • Download

Lines Matching full:code

42 code {
49 pre > code {
145code>_auth</code></a></li><li><a href="#access"><code>access</code></a></li><li><a href="#all"><co…
151 <p>Putting <code>--foo bar</code> on the command line sets the <code>foo</code> configuration
152 parameter to <code>"bar"</code>. A <code>--</code> argument tells the cli parser to stop
153 reading flags. Using <code>--flag</code> without specifying any value will set
154 the value to <code>true</code>.</p>
155 <p>Example: <code>--flag1 --flag2</code> will set both configuration parameters
156 to <code>true</code>, while <code>--flag1 --flag2 bar</code> will set <code>flag1</code> to <code>t…
157 and <code>flag2</code> to <code>bar</code>. Finally, <code>--flag1 --flag2 -- bar</code> will set
158 both configuration parameters to <code>true</code>, and the <code>bar</code> is taken
161 <p>Any environment variables that start with <code>npm_config_</code> will be
163 <code>npm_config_foo=bar</code> in your environment will set the <code>foo</code>
164 configuration parameter to <code>bar</code>. Any environment configurations that
165 are not given a value will be given the value of <code>true</code>. Config
166 values are case-insensitive, so <code>NPM_CONFIG_FOO=bar</code> will work the
167 same. However, please note that inside <a href="../using-npm/scripts.html"><code>scripts</code></a>
171 <p>Notice that you need to use underscores instead of dashes, so <code>--allow-same-version</code>
172 would become <code>npm_config_allow_same_version=true</code>.</p>
176 <li>per-project configuration file (<code>/path/to/my/project/.npmrc</code>)</li>
177 <li>per-user configuration file (defaults to <code>$HOME/.npmrc</code>; configurable via CLI
178 option <code>--userconfig</code> or environment variable <code>$NPM_CONFIG_USERCONFIG</code>)</li>
179 <li>global configuration file (defaults to <code>$PREFIX/etc/npmrc</code>; configurable via
180 CLI option <code>--globalconfig</code> or environment variable <code>$NPM_CONFIG_GLOBALCONFIG</code
181 <li>npm's built-in configuration file (<code>/path/to/npm/npmrc</code>)</li>
185 <p>Run <code>npm config ls -l</code> to see a set of configuration parameters that are
190 <li><code>-a</code>: <code>--all</code></li>
191 <li><code>--enjoy-by</code>: <code>--before</code></li>
192 <li><code>-c</code>: <code>--call</code></li>
193 <li><code>--desc</code>: <code>--description</code></li>
194 <li><code>-f</code>: <code>--force</code></li>
195 <li><code>-g</code>: <code>--global</code></li>
196 <li><code>--iwr</code>: <code>--include-workspace-root</code></li>
197 <li><code>-L</code>: <code>--location</code></li>
198 <li><code>-d</code>: <code>--loglevel info</code></li>
199 <li><code>-s</code>: <code>--loglevel silent</code></li>
200 <li><code>--silent</code>: <code>--loglevel silent</code></li>
201 <li><code>--ddd</code>: <code>--loglevel silly</code></li>
202 <li><code>--dd</code>: <code>--loglevel verbose</code></li>
203 <li><code>--verbose</code>: <code>--loglevel verbose</code></li>
204 <li><code>-q</code>: <code>--loglevel warn</code></li>
205 <li><code>--quiet</code>: <code>--loglevel warn</code></li>
206 <li><code>-l</code>: <code>--long</code></li>
207 <li><code>-m</code>: <code>--message</code></li>
208 <li><code>--local</code>: <code>--no-global</code></li>
209 <li><code>-n</code>: <code>--no-yes</code></li>
210 <li><code>--no</code>: <code>--no-yes</code></li>
211 <li><code>-p</code>: <code>--parseable</code></li>
212 <li><code>--porcelain</code>: <code>--parseable</code></li>
213 <li><code>-C</code>: <code>--prefix</code></li>
214 <li><code>--readonly</code>: <code>--read-only</code></li>
215 <li><code>--reg</code>: <code>--registry</code></li>
216 <li><code>-S</code>: <code>--save</code></li>
217 <li><code>-B</code>: <code>--save-bundle</code></li>
218 <li><code>-D</code>: <code>--save-dev</code></li>
219 <li><code>-E</code>: <code>--save-exact</code></li>
220 <li><code>-O</code>: <code>--save-optional</code></li>
221 <li><code>-P</code>: <code>--save-prod</code></li>
222 <li><code>-?</code>: <code>--usage</code></li>
223 <li><code>-h</code>: <code>--usage</code></li>
224 <li><code>-H</code>: <code>--usage</code></li>
225 <li><code>--help</code>: <code>--usage</code></li>
226 <li><code>-v</code>: <code>--version</code></li>
227 <li><code>-w</code>: <code>--workspace</code></li>
228 <li><code>--ws</code>: <code>--workspaces</code></li>
229 <li><code>-y</code>: <code>--yes</code></li>
234 <pre><code class="language-bash">npm ls --par
237 </code></pre>
242 <pre><code class="language-bash">npm ls -gpld
245 </code></pre>
247 <h4 id="auth"><code>_auth</code></h4>
257 ~/.npmrc file by running <code>npm login</code>.</p>
258 <h4 id="access"><code>access</code></h4>
265 installable) set <code>--access=restricted</code>.</p>
266 <p>Unscoped packages can not be set to <code>restricted</code>.</p>
268 packages. Specifying a value of <code>restricted</code> or <code>public</code> during publish will
269 change the access for an existing package the same way that <code>npm access set status</code> woul…
270 <h4 id="all"><code>all</code></h4>
275 <p>When running <code>npm outdated</code> and <code>npm ls</code>, setting <code>--all</code> will …
278 <h4 id="allow-same-version"><code>allow-same-version</code></h4>
283 <p>Prevents throwing an error when <code>npm version</code> is used to set the new version
285 <h4 id="audit"><code>audit</code></h4>
292 documentation for <a href="../commands/npm-audit.html"><code>npm audit</code></a> for details on wh…
294 <h4 id="audit-level"><code>audit-level</code></h4>
299 <p>The minimum level of vulnerability for <code>npm audit</code> to exit with a non-zero
300 exit code.</p>
301 <h4 id="auth-type"><code>auth-type</code></h4>
306 <p>What authentication strategy to use with <code>login</code>. Note that if an <code>otp</code>
307 config is given, this value will always be set to <code>legacy</code>.</p>
308 <h4 id="before"><code>before</code></h4>
313 <p>If passed to <code>npm install</code>, will rebuild the npm tree such that only
314 versions that were available <strong>on or before</strong> the <code>--before</code> time get
317 <p>If the requested version is a <code>dist-tag</code> and the given tag does not pass the
318 <code>--before</code> filter, the most recent version less than or equal to that tag
319 will be used. For example, <code>foo@latest</code> might install <code>foo@1.2</code> even though
320 <code>latest</code> is <code>2.0</code>.</p>
321 <h4 id="bin-links"><code>bin-links</code></h4>
326 <p>Tells npm to create symlinks (or <code>.cmd</code> shims on Windows) for package
331 <h4 id="browser"><code>browser</code></h4>
333 <li>Default: OS X: <code>"open"</code>, Windows: <code>"start"</code>, Others: <code>"xdg-open"</co…
337 <p>Set to <code>false</code> to suppress browser behavior and instead print urls to
339 <p>Set to <code>true</code> to use default system URL opener.</p>
340 <h4 id="ca"><code>ca</code></h4>
349 <pre><code class="language-ini">ca="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE--…
350 </code></pre>
351 <p>Set to <code>null</code> to only allow "known" registrars, or to a specific CA cert to
354 <pre><code class="language-ini">ca[]="..."
356 </code></pre>
357 <p>See also the <code>strict-ssl</code> config.</p>
358 <h4 id="cache"><code>cache</code></h4>
360 <li>Default: Windows: <code>%LocalAppData%\npm-cache</code>, Posix: <code>~/.npm</code></li>
364 <h4 id="cafile"><code>cafile</code></h4>
370 certificates. Similar to the <code>ca</code> setting, but allows for multiple CA's, as
372 <h4 id="call"><code>call</code></h4>
377 <p>Optional companion option for <code>npm exec</code>, <code>npx</code> that allows for specifying…
379 <pre><code class="language-bash">npm exec --package yo --package generator-node --call "yo node"
380 </code></pre>
381 <h4 id="cidr"><code>cidr</code></h4>
387 tokens with the <code>npm token create</code> command.</p>
388 <h4 id="color"><code>color</code></h4>
393 <p>If false, never shows colors. If <code>"always"</code> then always shows colors. If
395 <h4 id="commit-hooks"><code>commit-hooks</code></h4>
400 <p>Run git commit hooks when using the <code>npm version</code> command.</p>
401 <h4 id="depth"><code>depth</code></h4>
403 <li>Default: <code>Infinity</code> if <code>--all</code> is set, otherwise <code>1</code></li>
406 <p>The depth to go when recursing packages for <code>npm ls</code>.</p>
407 <p>If not set, <code>npm ls</code> will show only the immediate dependencies of the root
408 project. If <code>--all</code> is set, then npm will show all dependencies by default.</p>
409 <h4 id="description2"><code>description</code></h4>
414 <p>Show the description in <code>npm search</code></p>
415 <h4 id="diff"><code>diff</code></h4>
420 <p>Define arguments to compare in <code>npm diff</code>.</p>
421 <h4 id="diff-dst-prefix"><code>diff-dst-prefix</code></h4>
426 <p>Destination prefix to be used in <code>npm diff</code> output.</p>
427 <h4 id="diff-ignore-all-space"><code>diff-ignore-all-space</code></h4>
432 <p>Ignore whitespace when comparing lines in <code>npm diff</code>.</p>
433 <h4 id="diff-name-only"><code>diff-name-only</code></h4>
438 <p>Prints only filenames when using <code>npm diff</code>.</p>
439 <h4 id="diff-no-prefix"><code>diff-no-prefix</code></h4>
444 <p>Do not show any source or destination prefix in <code>npm diff</code> output.</p>
445 <p>Note: this causes <code>npm diff</code> to ignore the <code>--diff-src-prefix</code> and
446 <code>--diff-dst-prefix</code> configs.</p>
447 <h4 id="diff-src-prefix"><code>diff-src-prefix</code></h4>
452 <p>Source prefix to be used in <code>npm diff</code> output.</p>
453 <h4 id="diff-text"><code>diff-text</code></h4>
458 <p>Treat all files as text in <code>npm diff</code>.</p>
459 <h4 id="diff-unified"><code>diff-unified</code></h4>
464 <p>The number of lines of context to print in <code>npm diff</code>.</p>
465 <h4 id="dry-run"><code>dry-run</code></h4>
472 commands that modify your local installation, eg, <code>install</code>, <code>update</code>,
473 <code>dedupe</code>, <code>uninstall</code>, as well as <code>pack</code> and <code>publish</code>.…
474 <p>Note: This is NOT honored by other network related commands, eg <code>dist-tags</code>,
475 <code>owner</code>, etc.</p>
476 <h4 id="editor"><code>editor</code></h4>
482 <p>The command to run for <code>npm edit</code> and <code>npm config edit</code>.</p>
483 <h4 id="engine-strict"><code>engine-strict</code></h4>
491 <p>This can be overridden by setting the <code>--force</code> flag.</p>
492 <h4 id="fetch-retries"><code>fetch-retries</code></h4>
497 <p>The "retries" config for the <code>retry</code> module to use when fetching packages
501 <h4 id="fetch-retry-factor"><code>fetch-retry-factor</code></h4>
506 <p>The "factor" config for the <code>retry</code> module to use when fetching packages.</p>
507 <h4 id="fetch-retry-maxtimeout"><code>fetch-retry-maxtimeout</code></h4>
512 <p>The "maxTimeout" config for the <code>retry</code> module to use when fetching
514 <h4 id="fetch-retry-mintimeout"><code>fetch-retry-mintimeout</code></h4>
519 <p>The "minTimeout" config for the <code>retry</code> module to use when fetching
521 <h4 id="fetch-timeout"><code>fetch-timeout</code></h4>
527 <h4 id="force"><code>force</code></h4>
536 <li>Allow the <code>npm version</code> command to work on an unclean git repository.</li>
537 <li>Allow deleting the cache folder with <code>npm cache clean</code>.</li>
538 <li>Allow installing packages that have an <code>engines</code> declaration requiring a
540 <li>Allow installing packages that have an <code>engines</code> declaration requiring a
541 different version of <code>node</code>, even if <code>--engine-strict</code> is enabled.</li>
542 <li>Allow <code>npm audit fix</code> to install modules outside your stated dependency
546 <li>Implicitly set <code>--yes</code> during <code>npm init</code>.</li>
547 <li>Allow clobbering existing values in <code>npm pkg</code></li>
552 <h4 id="foreground-scripts"><code>foreground-scripts</code></h4>
557 <p>Run all build scripts (ie, <code>preinstall</code>, <code>install</code>, and <code>postinstall<…
562 <h4 id="format-package-lock"><code>format-package-lock</code></h4>
567 <p>Format <code>package-lock.json</code> or <code>npm-shrinkwrap.json</code> as a human readable
569 <h4 id="fund"><code>fund</code></h4>
574 <p>When "true" displays the message at the end of each <code>npm install</code>
575 …cies looking for funding. See <a href="../commands/npm-fund.html"><code>npm fund</code></a> for de…
576 <h4 id="git"><code>git</code></h4>
582 but is not in the <code>PATH</code>, then set this to the full path to the git binary.</p>
583 <h4 id="git-tag-version"><code>git-tag-version</code></h4>
588 <p>Tag the commit when using the <code>npm version</code> command. Setting this to false
590 <h4 id="global"><code>global</code></h4>
595 <p>Operates in "global" mode, so that packages are installed into the <code>prefix</code>
599 <li>packages are installed into the <code>{prefix}/lib/node_modules</code> folder, instead
601 <li>bin files are linked to <code>{prefix}/bin</code></li>
602 <li>man pages are linked to <code>{prefix}/share/man</code></li>
604 <h4 id="globalconfig"><code>globalconfig</code></h4>
611 <h4 id="heading"><code>heading</code></h4>
617 <h4 id="https-proxy"><code>https-proxy</code></h4>
622 <p>A proxy to use for outgoing https requests. If the <code>HTTPS_PROXY</code> or
623 <code>https_proxy</code> or <code>HTTP_PROXY</code> or <code>http_proxy</code> environment variable…
624 proxy settings will be honored by the underlying <code>make-fetch-happen</code>
626 <h4 id="if-present"><code>if-present</code></h4>
631 <p>If true, npm will not exit with an error code when <code>run-script</code> is invoked
632 for a script that isn't defined in the <code>scripts</code> section of <code>package.json</code>.
638 <h4 id="ignore-scripts"><code>ignore-scripts</code></h4>
645 <code>npm start</code>, <code>npm stop</code>, <code>npm restart</code>, <code>npm test</code>, and…
646 will still run their intended script if <code>ignore-scripts</code> is set, but they
648 <h4 id="include"><code>include</code></h4>
654 <p>This is the inverse of <code>--omit=&lt;type&gt;</code>.</p>
655 <p>Dependency types specified in <code>--include</code> will not be omitted, regardless of
657 <h4 id="include-staged"><code>include-staged</code></h4>
665 <h4 id="include-workspace-root"><code>include-workspace-root</code></h4>
671 <p>When false, specifying individual workspaces via the <code>workspace</code> config, or
672 all workspaces via the <code>workspaces</code> flag, will cause npm to operate only on
675 <h4 id="init-author-email"><code>init-author-email</code></h4>
680 <p>The value <code>npm init</code> should use by default for the package author's email.</p>
681 <h4 id="init-author-name"><code>init-author-name</code></h4>
686 <p>The value <code>npm init</code> should use by default for the package author's name.</p>
687 <h4 id="init-author-url"><code>init-author-url</code></h4>
692 <p>The value <code>npm init</code> should use by default for the package author's
694 <h4 id="init-license"><code>init-license</code></h4>
699 <p>The value <code>npm init</code> should use by default for the package license.</p>
700 <h4 id="init-module"><code>init-module</code></h4>
705 <p>A module that will be loaded by the <code>npm init</code> command. See the
709 <h4 id="init-version"><code>init-version</code></h4>
714 <p>The value that <code>npm init</code> should use by default for the package version
716 <h4 id="install-links"><code>install-links</code></h4>
724 <h4 id="install-strategy"><code>install-strategy</code></h4>
735 <h4 id="json"><code>json</code></h4>
742 <li>In <code>npm pkg set</code> it enables parsing set values with JSON.parse() before
743 saving them to your <code>package.json</code>.</li>
746 <h4 id="legacy-peer-deps"><code>legacy-peer-deps</code></h4>
751 <p>Causes npm to completely ignore <code>peerDependencies</code> when building a package
753 <p>If a package cannot be installed because of overly strict <code>peerDependencies</code>
755 <p>This differs from <code>--omit=peer</code>, in that <code>--omit=peer</code> will avoid unpacking
756 <code>peerDependencies</code> on disk, but will still design a tree such that
757 <code>peerDependencies</code> <em>could</em> be unpacked in a correct place.</p>
758 <p>Use of <code>legacy-peer-deps</code> is not recommended, as it will not enforce the
759 <code>peerDependencies</code> contract that meta-dependencies may rely on.</p>
760 <h4 id="link"><code>link</code></h4>
765 <p>Used with <code>npm ls</code>, limiting output to only those packages that are linked.</p>
766 <h4 id="local-address"><code>local-address</code></h4>
773 <h4 id="location"><code>location</code></h4>
775 <li>Default: "user" unless <code>--global</code> is passed, which will also set this value
779 <p>When passed to <code>npm config</code> this refers to which config file to use.</p>
780 <p>When set to "global" mode, packages are installed into the <code>prefix</code> folder
784 <li>packages are installed into the <code>{prefix}/lib/node_modules</code> folder, instead
786 <li>bin files are linked to <code>{prefix}/bin</code></li>
787 <li>man pages are linked to <code>{prefix}/share/man</code></li>
789 <h4 id="lockfile-version"><code>lockfile-version</code></h4>
807 <h4 id="loglevel"><code>loglevel</code></h4>
817 <p>See also the <code>foreground-scripts</code> config.</p>
818 <h4 id="logs-dir"><code>logs-dir</code></h4>
820 <li>Default: A directory named <code>_logs</code> inside the cache</li>
823 …cation of npm's log directory. See <a href="../using-npm/logging.html"><code>npm logging</code></a>
825 <h4 id="logs-max"><code>logs-max</code></h4>
832 <h4 id="long"><code>long</code></h4>
837 <p>Show extended information in <code>ls</code>, <code>search</code>, and <code>help-search</code>.…
838 <h4 id="maxsockets"><code>maxsockets</code></h4>
845 <h4 id="message"><code>message</code></h4>
850 <p>Commit message which is used by <code>npm version</code> when creating version commit.</p>
852 <h4 id="node-options"><code>node-options</code></h4>
857 <p>Options to pass through to Node.js via the <code>NODE_OPTIONS</code> environment
860 <h4 id="noproxy"><code>noproxy</code></h4>
867 <h4 id="offline"><code>offline</code></h4>
873 allow the CLI to fill in missing cache data, see <code>--prefer-offline</code>.</p>
874 <h4 id="omit"><code>omit</code></h4>
876 <li>Default: 'dev' if the <code>NODE_ENV</code> environment variable is set to
882 <code>package-lock.json</code> or <code>npm-shrinkwrap.json</code> file. They are just not
884 <p>If a package type appears in both the <code>--include</code> and <code>--omit</code> lists, then
886 <p>If the resulting omit list includes <code>'dev'</code>, then the <code>NODE_ENV</code> environme…
887 variable will be set to <code>'production'</code> for all lifecycle scripts.</p>
888 <h4 id="omit-lockfile-registry-resolved"><code>omit-lockfile-registry-resolved</code></h4>
893 <p>This option causes npm to create lock files without a <code>resolved</code> key for
897 <h4 id="otp"><code>otp</code></h4>
903 when publishing or changing package permissions with <code>npm access</code>.</p>
906 <h4 id="pack-destination"><code>pack-destination</code></h4>
911 <p>Directory in which <code>npm pack</code> will save tarballs.</p>
912 <h4 id="package"><code>package</code></h4>
917 <p>The package or packages to install for <a href="../commands/npm-exec.html"><code>npm exec</code>…
918 <h4 id="package-lock"><code>package-lock</code></h4>
923 <p>If set to false, then ignore <code>package-lock.json</code> files when installing. This
924 will also prevent <em>writing</em> <code>package-lock.json</code> if <code>save</code> is true.</p>
925 <h4 id="package-lock-only"><code>package-lock-only</code></h4>
930 <p>If set to true, the current operation will only use the <code>package-lock.json</code>,
931 ignoring <code>node_modules</code>.</p>
932 <p>For <code>update</code> this means only the <code>package-lock.json</code> will be updated,
933 instead of checking <code>node_modules</code> and downloading dependencies.</p>
934 <p>For <code>list</code> this means the output will be based on the tree described by the
935 <code>package-lock.json</code>, rather than the contents of <code>node_modules</code>.</p>
936 <h4 id="parseable"><code>parseable</code></h4>
942 <code>npm search</code>, this will be tab-separated table format.</p>
943 <h4 id="prefer-dedupe"><code>prefer-dedupe</code></h4>
950 <h4 id="prefer-offline"><code>prefer-offline</code></h4>
957 <code>--offline</code>.</p>
958 <h4 id="prefer-online"><code>prefer-online</code></h4>
965 <h4 id="prefix"><code>prefix</code></h4>
974 <h4 id="preid"><code>preid</code></h4>
980 a semver. Like the <code>rc</code> in <code>1.2.0-rc.8</code>.</p>
981 <h4 id="progress"><code>progress</code></h4>
983 <li>Default: <code>true</code> unless running in a known CI system</li>
986 <p>When set to <code>true</code>, npm will display a progress bar during time intensive
987 operations, if <code>process.stderr</code> is a TTY.</p>
988 <p>Set to <code>false</code> to suppress the progress bar.</p>
989 <h4 id="provenance"><code>provenance</code></h4>
996 <p>This config can not be used with: <code>provenance-file</code></p>
997 <h4 id="provenance-file"><code>provenance-file</code></h4>
1003 <p>This config can not be used with: <code>provenance</code></p>
1004 <h4 id="proxy"><code>proxy</code></h4>
1009 <p>A proxy to use for outgoing http requests. If the <code>HTTP_PROXY</code> or
1010 <code>http_proxy</code> environment variables are set, proxy settings will be honored
1011 by the underlying <code>request</code> library.</p>
1012 <h4 id="read-only"><code>read-only</code></h4>
1018 access tokens with the <code>npm token create</code> command.</p>
1019 <h4 id="rebuild-bundle"><code>rebuild-bundle</code></h4>
1025 <h4 id="registry"><code>registry</code></h4>
1031 <h4 id="replace-registry-host"><code>replace-registry-host</code></h4>
1043 <h4 id="save"><code>save</code></h4>
1045 <li>Default: <code>true</code> unless when using <code>npm update</code> where it defaults to <code
1048 <p>Save installed packages to a <code>package.json</code> file as dependencies.</p>
1049 <p>When used with the <code>npm rm</code> command, removes the dependency from
1050 <code>package.json</code>.</p>
1051 <p>Will also prevent writing to <code>package-lock.json</code> if set to <code>false</code>.</p>
1052 <h4 id="save-bundle"><code>save-bundle</code></h4>
1057 <p>If a package would be saved at install time by the use of <code>--save</code>,
1058 <code>--save-dev</code>, or <code>--save-optional</code>, then also put it in the
1059 <code>bundleDependencies</code> list.</p>
1060 <p>Ignored if <code>--save-peer</code> is set, since peerDependencies cannot be bundled.</p>
1061 <h4 id="save-dev"><code>save-dev</code></h4>
1066 <p>Save installed packages to a package.json file as <code>devDependencies</code>.</p>
1067 <h4 id="save-exact"><code>save-exact</code></h4>
1074 <h4 id="save-optional"><code>save-optional</code></h4>
1079 <p>Save installed packages to a package.json file as <code>optionalDependencies</code>.</p>
1080 <h4 id="save-peer"><code>save-peer</code></h4>
1085 <p>Save installed packages to a package.json file as <code>peerDependencies</code></p>
1086 <h4 id="save-prefix"><code>save-prefix</code></h4>
1092 <code>--save</code> or <code>--save-dev</code> get prefixed.</p>
1093 <p>For example if a package has version <code>1.2.3</code>, by default its version is set
1094code>^1.2.3</code> which allows minor upgrades for that package, but after <code>npm config set sa…
1096 <h4 id="save-prod"><code>save-prod</code></h4>
1101 <p>Save installed packages into <code>dependencies</code> specifically. This is useful if
1102 a package already exists in <code>devDependencies</code> or <code>optionalDependencies</code>, but
1104 <p>This is the default behavior if <code>--save</code> is true, and neither <code>--save-dev</code>
1105 or <code>--save-optional</code> are true.</p>
1106 <h4 id="scope"><code>scope</code></h4>
1113 <pre><code># log in, linking the scope to the custom registry
1118 </code></pre>
1119 <p>This will cause <code>@mycorp</code> to be mapped to the registry for future
1121 <code>@mycorp/package</code>.</p>
1122 <p>This will also cause <code>npm init</code> to create a scoped package.</p>
1123 <pre><code># accept all defaults, and create a package named "@foo/whatever",
1126 </code></pre>
1127 <h4 id="script-shell"><code>script-shell</code></h4>
1132 …o use for scripts run with the <code>npm exec</code>, <code>npm run</code> and <code>npm init &lt;…
1133 <h4 id="searchexclude"><code>searchexclude</code></h4>
1139 <h4 id="searchlimit"><code>searchlimit</code></h4>
1146 <h4 id="searchopts"><code>searchopts</code></h4>
1152 <h4 id="searchstaleness"><code>searchstaleness</code></h4>
1159 <h4 id="shell"><code>shell</code></h4>
1165 <p>The shell to run for the <code>npm explore</code> command.</p>
1166 <h4 id="sign-git-commit"><code>sign-git-commit</code></h4>
1171 <p>If set to true, then the <code>npm version</code> command will commit the new package
1172 version using <code>-S</code> to add a signature.</p>
1175 <h4 id="sign-git-tag"><code>sign-git-tag</code></h4>
1180 <p>If set to true, then the <code>npm version</code> command will tag the version using
1181 <code>-s</code> to add a signature.</p>
1184 <h4 id="strict-peer-deps"><code>strict-peer-deps</code></h4>
1189 <p>If set to <code>true</code>, and <code>--legacy-peer-deps</code> is not set, then <em>any</em>
1190 conflicting <code>peerDependencies</code> will be treated as an install failure, even
1193 <p>By default, conflicting <code>peerDependencies</code> deep in the dependency graph will
1196 the range set in their package's <code>peerDependencies</code> object.</p>
1198 conflict and the packages involved. If <code>--strict-peer-deps</code> is set, then
1200 <h4 id="strict-ssl"><code>strict-ssl</code></h4>
1207 <p>See also the <code>ca</code> config.</p>
1208 <h4 id="tag"><code>tag</code></h4>
1215 <p>Also the tag that is added to the package@version specified by the <code>npm tag</code>
1217 <p>When used by the <code>npm diff</code> command, this is the tag used to fetch the
1219 <h4 id="tag-version-prefix"><code>tag-version-prefix</code></h4>
1225 version increment using <code>npm version</code>. To remove the prefix altogether, set
1226 it to the empty string: <code>""</code>.</p>
1228 like <code>v1.0.0</code>, <em>only use this property if it is absolutely necessary</em>. In
1230 <h4 id="timing"><code>timing</code></h4>
1236 cache or <code>logs-dir</code>. The file name ends with <code>-timing.json</code>.</p>
1238 <code>cat ~/.npm/_logs/*-timing.json | npm exec -- json -g</code>.</p>
1240 while still writing the timing file, use <code>--silent</code>.</p>
1241 <h4 id="umask"><code>umask</code></h4>
1248 <p>Folders and executables are given a mode which is <code>0o777</code> masked against
1249 this value. Other files are given a mode which is <code>0o666</code> masked against
1253 rather adds the <code>--umask</code> config to it.</p>
1257 <h4 id="unicode"><code>unicode</code></h4>
1260 as defined by the <code>LC_ALL</code>, <code>LC_CTYPE</code>, or <code>LANG</code> environment vari…
1265 <h4 id="update-notifier"><code>update-notifier</code></h4>
1272 <h4 id="usage"><code>usage</code></h4>
1278 <h4 id="user-agent"><code>user-agent</code></h4>
1287 <li><code>{npm-version}</code> - The npm version in use</li>
1288 <li><code>{node-version}</code> - The Node.js version in use</li>
1289 <li><code>{platform}</code> - The value of <code>process.platform</code></li>
1290 <li><code>{arch}</code> - The value of <code>process.arch</code></li>
1291 <li><code>{workspaces}</code> - Set to <code>true</code> if the <code>workspaces</code> or <code>wo…
1293 <li><code>{ci}</code> - The value of the <code>ci-name</code> config, if set, prefixed with <code>c…
1294 an empty string if <code>ci-name</code> is empty.</li>
1296 <h4 id="userconfig"><code>userconfig</code></h4>
1302 <p>This may be overridden by the <code>npm_config_userconfig</code> environment variable
1303 or the <code>--userconfig</code> command line option, but may <em>not</em> be overridden by
1304 settings in the <code>globalconfig</code> file.</p>
1305 <h4 id="version"><code>version</code></h4>
1312 <h4 id="versions"><code>versions</code></h4>
1317 <p>If true, output the npm version as well as node's <code>process.versions</code> map and
1318 the version in the current working directory's <code>package.json</code> file if one
1321 <h4 id="viewer"><code>viewer</code></h4>
1327 <p>Set to <code>"browser"</code> to view html help content in the default web browser.</p>
1328 <h4 id="which"><code>which</code></h4>
1334 <h4 id="workspace"><code>workspace</code></h4>
1342 <p>Valid values for the <code>workspace</code> config are either:</p>
1349 <p>When set for the <code>npm init</code> command, this may be set to the folder of a
1353 <h4 id="workspaces"><code>workspaces</code></h4>
1360 <p>Explicitly setting this to false will cause commands like <code>install</code> to
1363 <li>Commands that operate on the <code>node_modules</code> tree (install, update, etc.)
1364 will link workspaces into the <code>node_modules</code> folder. - Commands that do
1366 <em>unless</em> one or more workspaces are specified in the <code>workspace</code> config.</li>
1369 <h4 id="workspaces-update"><code>workspaces-update</code></h4>
1375 possibly change the workspaces installed to the <code>node_modules</code> folder.</p>
1376 <h4 id="yes"><code>yes</code></h4>
1383 <h4 id="also"><code>also</code></h4>
1389 <p>When set to <code>dev</code> or <code>development</code>, this is an alias for <code>--include=d…
1390 <h4 id="cache-max"><code>cache-max</code></h4>
1394 <li>DEPRECATED: This option has been deprecated in favor of <code>--prefer-online</code></li>
1396 <p><code>--cache-max=0</code> is an alias for <code>--prefer-online</code></p>
1397 <h4 id="cache-min"><code>cache-min</code></h4>
1401 <li>DEPRECATED: This option has been deprecated in favor of <code>--prefer-offline</code>.</li>
1403 <p><code>--cache-min=9999 (or bigger)</code> is an alias for <code>--prefer-offline</code>.</p>
1404 <h4 id="cert"><code>cert</code></h4>
1408 <li>DEPRECATED: <code>key</code> and <code>cert</code> are no longer used for most registry
1409 operations. Use registry scoped <code>keyfile</code> and <code>certfile</code> instead. Example:
1416 <pre><code class="language-ini">cert="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE…
1417 </code></pre>
1421 <h4 id="ci-name"><code>ci-name</code></h4>
1423 <li>Default: The name of the current CI system, or <code>null</code> when not on a known CI
1431 <a href="http://npm.im/ci-info"><code>ci-info</code></a> module.</p>
1432 <h4 id="dev"><code>dev</code></h4>
1438 <p>Alias for <code>--include=dev</code>.</p>
1439 <h4 id="global-style"><code>global-style</code></h4>
1444 <code>--install-strategy=shallow</code></li>
1446 <p>Only install direct dependencies in the top level <code>node_modules</code>, but hoist
1447 on deeper dependencies. Sets <code>--install-strategy=shallow</code>.</p>
1448 <h4 id="initauthoremail"><code>init.author.email</code></h4>
1452 <li>DEPRECATED: Use <code>--init-author-email</code> instead.</li>
1454 <p>Alias for <code>--init-author-email</code></p>
1455 <h4 id="initauthorname"><code>init.author.name</code></h4>
1459 <li>DEPRECATED: Use <code>--init-author-name</code> instead.</li>
1461 <p>Alias for <code>--init-author-name</code></p>
1462 <h4 id="initauthorurl"><code>init.author.url</code></h4>
1466 <li>DEPRECATED: Use <code>--init-author-url</code> instead.</li>
1468 <p>Alias for <code>--init-author-url</code></p>
1469 <h4 id="initlicense"><code>init.license</code></h4>
1473 <li>DEPRECATED: Use <code>--init-license</code> instead.</li>
1475 <p>Alias for <code>--init-license</code></p>
1476 <h4 id="initmodule"><code>init.module</code></h4>
1480 <li>DEPRECATED: Use <code>--init-module</code> instead.</li>
1482 <p>Alias for <code>--init-module</code></p>
1483 <h4 id="initversion"><code>init.version</code></h4>
1487 <li>DEPRECATED: Use <code>--init-version</code> instead.</li>
1489 <p>Alias for <code>--init-version</code></p>
1490 <h4 id="key"><code>key</code></h4>
1494 <li>DEPRECATED: <code>key</code> and <code>cert</code> are no longer used for most registry
1495 operations. Use registry scoped <code>keyfile</code> and <code>certfile</code> instead. Example:
1501 <pre><code class="language-ini">key="-----BEGIN PRIVATE KEY-----\nXXXX\nXXXX\n-----END PRIVATE KEY-…
1502 </code></pre>
1505 <h4 id="legacy-bundling"><code>legacy-bundling</code></h4>
1510 <code>--install-strategy=nested</code></li>
1512 <p>Instead of hoisting package installs in <code>node_modules</code>, install packages in
1515 de-duplicating. Sets <code>--install-strategy=nested</code>.</p>
1516 <h4 id="only"><code>only</code></h4>
1520 <li>DEPRECATED: Use <code>--omit=dev</code> to omit dev dependencies from the install.</li>
1522 <p>When set to <code>prod</code> or <code>production</code>, this is an alias for <code>--omit=dev<…
1523 <h4 id="optional"><code>optional</code></h4>
1527 <li>DEPRECATED: Use <code>--omit=optional</code> to exclude optional dependencies, or
1528 <code>--include=optional</code> to include them.</li>
1532 <h4 id="production"><code>production</code></h4>
1536 <li>DEPRECATED: Use <code>--omit=dev</code> instead.</li>
1538 <p>Alias for <code>--omit=dev</code></p>
1539 <h4 id="shrinkwrap"><code>shrinkwrap</code></h4>
1546 <h4 id="tmp"><code>tmp</code></h4>
1548 <li>Default: The value returned by the Node.js <code>os.tmpdir()</code> method
1553 <a href="http://npm.im/cacache"><code>cacache</code></a>.</li>