/var/lang/lib/node_modules/npm/man/man1
This explorer reads the filesystem of the server it runs on, so /workspace/user isn't present here. Browsing and the terminal still work against this server's own disk from /.
.TH "NPM-INSTALL" "1" "February 2026" "NPM@11.11.0" "".SH "NAME"\fBnpm-install\fR - Install a package.SS "Synopsis".P.RS 2.nfnpm install \[lB]<package-spec> ...\[rB] aliases: add, i, in, ins, inst, insta, instal, isnt, isnta, isntal, isntall.fi.RE.SS "Description".PThis command installs a package and any packages that it depends on. If the package has a package-lock, or an npm shrinkwrap file, or a yarn lock file, the installation of dependencies will be driven by that, respecting the following order of precedence:.RS 0.IP \(bu 4\fBnpm-shrinkwrap.json\fR.IP \(bu 4\fBpackage-lock.json\fR.IP \(bu 4\fByarn.lock\fR.RE 0 .PSee \fBpackage-lock.json\fR \fI\(la/configuring-npm/package-lock-json\(ra\fR and npm help shrinkwrap..SS "How \fBnpm install\fR uses \fBpackage-lock.json\fR".PWhen you run \fBnpm install\fR without arguments, npm compares \fBpackage.json\fR and \fBpackage-lock.json\fR:.RS 0.IP \(bu 4\fBIf the lockfile's resolved versions satisfy the \fBpackage.json\fB ranges:\fR npm uses the exact versions from \fBpackage-lock.json\fR to ensure reproducible builds across environments..IP \(bu 4\fBIf the ranges don't match:\fR npm resolves new versions that satisfy the \fBpackage.json\fR ranges and updates \fBpackage-lock.json\fR accordingly. This happens when you modify version ranges in \fBpackage.json\fR (e.g., changing \fB^7.0.0\fR to \fB^8.0.0\fR). Note that changing a range within the same major version (e.g., \fB^7.0.0\fR to \fB^7.1.0\fR) will only update the metadata in the lockfile if the currently installed version still satisfies the new range..RE 0 .PIn essence, \fBpackage-lock.json\fR locks your dependencies to specific versions, but \fBpackage.json\fR is the source of truth for acceptable version ranges. When the lockfile's versions satisfy the \fBpackage.json\fR ranges, the lockfile wins. When they conflict, \fBpackage.json\fR wins and the lockfile is updated..PIf you want to install packages while ensuring that \fBpackage.json\fR is not modified and that both files are strictly in sync, use npm help ci instead..PA \fBpackage\fR is:.RS 0.IP \(bu 4a) a folder containing a program described by a \fB\[rs]fBpackage.json\[rs]fR\fR \fI\(la/configuring-npm/package-json\(ra\fR file.IP \(bu 4b) a gzipped tarball containing (a).IP \(bu 4c) a url that resolves to (b).IP \(bu 4d) a \fB<name>@<version>\fR that is published on the registry (see npm help registry) with (c).IP \(bu 4e) a \fB<name>@<tag>\fR (see npm help dist-tag) that points to (d).IP \(bu 4f) a \fB<name>\fR that has a "latest" tag satisfying (e).IP \(bu 4g) a \fB<git remote url>\fR that resolves to (a).RE 0 .PEven if you never publish your package, you can still get a lot of benefits of using npm if you just want to write a node program (a), and perhaps if you also want to be able to easily install it elsewhere after packing it up into a tarball (b)..RS 0.IP \(bu 4\fBnpm install\fR (in a package directory, no arguments):.PInstall the dependencies to the local \fBnode_modules\fR folder..PIn global mode (ie, with \fB-g\fR or \fB--global\fR appended to the command), it installs the current package context (ie, the current working directory) as a global package..PBy default, \fBnpm install\fR will install all modules listed as dependencies in \fB\[rs]fBpackage.json\[rs]fR\fR \fI\(la/configuring-npm/package-json\(ra\fR..PWith the \fB--production\fR flag (or when the \fBNODE_ENV\fR environment variable is set to \fBproduction\fR), npm will not install modules listed in \fBdevDependencies\fR. To install all modules listed in both \fBdependencies\fR and \fBdevDependencies\fR when \fBNODE_ENV\fR environment variable is set to \fBproduction\fR, you can use \fB--production=false\fR..RS 4.PNOTE: The \fB--production\fR flag has no particular meaning when adding a dependency to a project..RE 0 .IP \(bu 4\fBnpm install <folder>\fR:.PIf \fB<folder>\fR sits inside the root of your project, its dependencies will be installed and may be hoisted to the top-level \fBnode_modules\fR as they would for other types of dependencies. If \fB<folder>\fR sits outside the root of your project, \fInpm will not install the package dependencies\fR in the directory \fB<folder>\fR, but it will create a symlink to \fB<folder>\fR..RS 4.PNOTE: If you want to install the content of a directory like a package from the registry instead of creating a link, you would need to use the \fB--install-links\fR option..RE 0 .PExample:.P.RS 2.nfnpm install ../../other-package --install-linksnpm install ./sub-package.fi.RE.IP \(bu 4\fBnpm install <tarball file>\fR:.PInstall a package that is sitting on the filesystem. Note: if you just want to link a dev directory into your npm root, you can do this more easily by using npm help link..PTarball requirements:.RS 4.IP \(bu 4The filename \fImust\fR use \fB.tar\fR, \fB.tar.gz\fR, or \fB.tgz\fR as the extension..IP \(bu 4The package contents should reside in a subfolder inside the tarball (usually it is called \fBpackage/\fR). npm strips one directory layer when installing the package (an equivalent of \fBtar x --strip-components=1\fR is run)..IP \(bu 4The package must contain a \fBpackage.json\fR file with \fBname\fR and \fBversion\fR properties..RE 0 .PExample:.P.RS 2.nfnpm install ./package.tgz.fi.RE.IP \(bu 4\fBnpm install <tarball url>\fR:.PFetch the tarball url, and then install it. In order to distinguish between this and other options, the argument must start with "http://" or "https://".PExample:.P.RS 2.nfnpm install https://github.com/indexzero/forever/tarball/v0.5.6.fi.RE.IP \(bu 4\fBnpm install \[lB]<@scope>/\[rB]<name>\fR:.PDo a \fB<name>@<tag>\fR install, where \fB<tag>\fR is the "tag" config. (See \fB\[rs]fBconfig\[rs]fR\fR \fI\(la/using-npm/config#tag\(ra\fR. The config's default value is \fBlatest\fR.).PIn most cases, this will install the version of the modules tagged as \fBlatest\fR on the npm registry..P\fBNote:\fR When installing by name without specifying a version or tag, npm prioritizes versions that match the current Node.js version based on the package's \fBengines\fR field. If the \fBlatest\fR tag points to a version incompatible with your current Node.js version, npm will install the newest compatible version instead. To install a specific version regardless of \fBengines\fR compatibility, explicitly specify the version or tag: \fBnpm install <name>@latest\fR..PExample:.P.RS 2.nfnpm install sax.fi.RE.P\fBnpm install\fR saves any specified packages into \fBdependencies\fR by default. Additionally, you can control where and how they get saved with some additional flags:.RS 4.IP \(bu 4\fB-P, --save-prod\fR: Package will appear in your \fBdependencies\fR. This is the default unless \fB-D\fR or \fB-O\fR are present..IP \(bu 4\fB-D, --save-dev\fR: Package will appear in your \fBdevDependencies\fR..IP \(bu 4\fB--save-peer\fR: Package will appear in your \fBpeerDependencies\fR..IP \(bu 4\fB-O, --save-optional\fR: Package will appear in your \fBoptionalDependencies\fR..IP \(bu 4\fB--no-save\fR: Prevents saving to \fBdependencies\fR..RE 0 .PWhen using any of the above options to save dependencies to your package.json, there are two additional, optional flags:.RS 4.IP \(bu 4\fB-E, --save-exact\fR: Saved dependencies will be configured with an exact version rather than using npm's default semver range operator..IP \(bu 4\fB-B, --save-bundle\fR: Saved dependencies will also be added to your \fBbundleDependencies\fR list..RE 0 .PFurther, if you have an \fBnpm-shrinkwrap.json\fR or \fBpackage-lock.json\fR then it will be updated as well..P\fB<scope>\fR is optional. The package will be downloaded from the registry associated with the specified scope. If no registry is associated with the given scope the default registry is assumed. See npm help scope..PNote: if you do not include the @-symbol on your scope name, npm will interpret this as a GitHub repository instead, see below. Scopes names must also be followed by a slash..PExamples:.P.RS 2.nfnpm install saxnpm install githubname/reponamenpm install @myorg/privatepackagenpm install node-tap --save-devnpm install dtrace-provider --save-optionalnpm install readable-stream --save-exactnpm install ansi-regex --save-bundle.fi.RE.IP \(bu 4\fBnpm install <alias>@npm:<name>\fR:.PInstall a package under a custom alias. Allows multiple versions of a same-name package side-by-side, more convenient import names for packages with otherwise long ones, and using git forks replacements or forked npm packages as replacements. Aliasing works only on your project and does not rename packages in transitive dependencies. Aliases should follow the naming conventions stated in \fB\[rs]fBvalidate-npm-package-name\[rs]fR\fR \fI\(lahttps://www.npmjs.com/package/validate-npm-package-name#naming-rules\(ra\fR..PExamples:.P.RS 2.nfnpm install my-react@npm:reactnpm install jquery2@npm:jquery@2npm install jquery3@npm:jquery@3npm install npa@npm:npm-package-arg.fi.RE.IP \(bu 4\fBnpm install \[lB]<@scope>/\[rB]<name>@<tag>\fR:.PInstall the version of the package that is referenced by the specified tag. If the tag does not exist in the registry data for that package, then this will fail..PExample:.P.RS 2.nfnpm install sax@latestnpm install @myorg/mypackage@latest.fi.RE.IP \(bu 4\fBnpm install \[lB]<@scope>/\[rB]<name>@<version>\fR:.PInstall the specified version of the package. This will fail if the version has not been published to the registry..PExample:.P.RS 2.nfnpm install sax@0.1.1npm install @myorg/privatepackage@1.5.0.fi.RE.IP \(bu 4\fBnpm install \[lB]<@scope>/\[rB]<name>@<version range>\fR:.PInstall a version of the package matching the specified version range. This will follow the same rules for resolving dependencies described in \fB\[rs]fBpackage.json\[rs]fR\fR \fI\(la/configuring-npm/package-json\(ra\fR..PNote that most version ranges must be put in quotes so that your shell will treat it as a single argument..PExample:.P.RS 2.nfnpm install sax@">=0.1.0 <0.2.0"npm install @myorg/privatepackage@"16 - 17".fi.RE.P\fBPrerelease versions:\fR By default, version ranges only match stable versions. To include prerelease versions, they must be explicitly specified in the range. Prerelease versions are tied to a specific version triple (major.minor.patch). For example, \fB^1.2.3-beta.1\fR will only match prereleases for \fB1.2.x\fR, not \fB1.3.x\fR. To match all prereleases for a major version, use a range like \fB^1.0.0-0\fR, which will include all \fB1.x.x\fR prereleases..PExample:.P.RS 2.nfnpm install package@^1.2.3-beta.1 # Matches 1.2.3-beta.1, 1.2.3-beta.2, 1.2.4-beta.1, etc.npm install package@^1.0.0-0 # Matches all 1.x.x prereleases and stable versions.fi.RE.IP \(bu 4\fBnpm install <git remote url>\fR:.PInstalls the package from the hosted git provider, cloning it with \fBgit\fR. For a full git remote url, only that URL will be attempted..P.RS 2.nf<protocol>://\[lB]<user>\[lB]:<password>\[rB]@\[rB]<hostname>\[lB]:<port>\[rB]\[lB]:\[rB]\[lB]/\[rB]<path>\[lB]#<commit-ish> | #semver:<semver>\[rB].fi.RE.P\fB<protocol>\fR is one of \fBgit\fR, \fBgit+ssh\fR, \fBgit+http\fR, \fBgit+https\fR, or \fBgit+file\fR..PIf \fB#<commit-ish>\fR is provided, it will be used to clone exactly that commit. If the commit-ish has the format \fB#semver:<semver>\fR, \fB<semver>\fR can be any valid semver range or exact version, and npm will look for any tags or refs matching that range in the remote repository, much as it would for a registry dependency. If neither \fB#<commit-ish>\fR or \fB#semver:<semver>\fR is specified, then the default branch of the repository is used..PIf the repository makes use of submodules, those submodules will be cloned as well..PIf the package being installed contains a \fBprepare\fR script, its \fBdependencies\fR and \fBdevDependencies\fR will be installed, and the prepare script will be run, before the package is packaged and installed..PThe following git environment variables are recognized by npm and will be added to the environment when running git:.RS 4.IP \(bu 4\fBGIT_ASKPASS\fR.IP \(bu 4\fBGIT_EXEC_PATH\fR.IP \(bu 4\fBGIT_PROXY_COMMAND\fR.IP \(bu 4\fBGIT_SSH\fR.IP \(bu 4\fBGIT_SSH_COMMAND\fR.IP \(bu 4\fBGIT_SSL_CAINFO\fR.IP \(bu 4\fBGIT_SSL_NO_VERIFY\fR.RE 0 .PSee the git man page for details..PExamples:.P.RS 2.nfnpm install git+ssh://git@github.com:npm/cli.git#v1.0.27npm install git+ssh://git@github.com:npm/cli#pull/273npm install git+ssh://git@github.com:npm/cli#semver:^5.0npm install git+https://isaacs@github.com/npm/cli.gitnpm install git://github.com/npm/cli.git#v1.0.27GIT_SSH_COMMAND='ssh -i ~/.ssh/custom_ident' npm install git+ssh://git@github.com:npm/cli.git.fi.RE.IP \(bu 4\fBnpm install <githubname>/<githubrepo>\[lB]#<commit-ish>\[rB]\fR:.IP \(bu 4\fBnpm install github:<githubname>/<githubrepo>\[lB]#<commit-ish>\[rB]\fR:.PInstall the package at \fBhttps://github.com/githubname/githubrepo\fR by attempting to clone it using \fBgit\fR..PIf \fB#<commit-ish>\fR is provided, it will be used to clone exactly that commit. If the commit-ish has the format \fB#semver:<semver>\fR, \fB<semver>\fR can be any valid semver range or exact version, and npm will look for any tags or refs matching that range in the remote repository, much as it would for a registry dependency. If neither \fB#<commit-ish>\fR or \fB#semver:<semver>\fR is specified, then the default branch is used..PAs with regular git dependencies, \fBdependencies\fR and \fBdevDependencies\fR will be installed if the package has a \fBprepare\fR script before the package is done installing..PExamples:.P.RS 2.nfnpm install mygithubuser/myprojectnpm install github:mygithubuser/myproject.fi.RE.IP \(bu 4\fBnpm install gist:\[lB]<githubname>/\[rB]<gistID>\[lB]#<commit-ish>|#semver:<semver>\[rB]\fR:.PInstall the package at \fBhttps://gist.github.com/gistID\fR by attempting to clone it using \fBgit\fR. The GitHub username associated with the gist is optional and will not be saved in \fBpackage.json\fR..PAs with regular git dependencies, \fBdependencies\fR and \fBdevDependencies\fR will be installed if the package has a \fBprepare\fR script before the package is done installing..PExample:.P.RS 2.nfnpm install gist:101a11beef.fi.RE.IP \(bu 4\fBnpm install bitbucket:<bitbucketname>/<bitbucketrepo>\[lB]#<commit-ish>\[rB]\fR:.PInstall the package at \fBhttps://bitbucket.org/bitbucketname/bitbucketrepo\fR by attempting to clone it using \fBgit\fR..PIf \fB#<commit-ish>\fR is provided, it will be used to clone exactly that commit. If the commit-ish has the format \fB#semver:<semver>\fR, \fB<semver>\fR can be any valid semver range or exact version, and npm will look for any tags or refs matching that range in the remote repository, much as it would for a registry dependency. If neither \fB#<commit-ish>\fR or \fB#semver:<semver>\fR is specified, then \fBmaster\fR is used..PAs with regular git dependencies, \fBdependencies\fR and \fBdevDependencies\fR will be installed if the package has a \fBprepare\fR script before the package is done installing..PExample:.P.RS 2.nfnpm install bitbucket:mybitbucketuser/myproject.fi.RE.IP \(bu 4\fBnpm install gitlab:<gitlabname>/<gitlabrepo>\[lB]#<commit-ish>\[rB]\fR:.PInstall the package at \fBhttps://gitlab.com/gitlabname/gitlabrepo\fR by attempting to clone it using \fBgit\fR..PIf \fB#<commit-ish>\fR is provided, it will be used to clone exactly that commit. If the commit-ish has the format \fB#semver:<semver>\fR, \fB<semver>\fR can be any valid semver range or exact version, and npm will look for any tags or refs matching that range in the remote repository, much as it would for a registry dependency. If neither \fB#<commit-ish>\fR or \fB#semver:<semver>\fR is specified, then \fBmaster\fR is used..PAs with regular git dependencies, \fBdependencies\fR and \fBdevDependencies\fR will be installed if the package has a \fBprepare\fR script before the package is done installing..PExample:.P.RS 2.nfnpm install gitlab:mygitlabuser/myprojectnpm install gitlab:myusr/myproj#semver:^5.0.fi.RE.RE 0 .PYou may combine multiple arguments and even multiple types of arguments. For example:.P.RS 2.nfnpm install sax@">=0.1.0 <0.2.0" bench supervisor.fi.RE.PThe \fB--tag\fR argument will apply to all of the specified install targets. If a tag with the given name exists, the tagged version is preferred over newer versions..P\fBNote:\fR The \fB--tag\fR option only affects packages specified on the command line. It does not override version ranges specified in \fBpackage.json\fR. For example, if \fBpackage.json\fR specifies \fB"foo": "^1.0.0"\fR and you run \fBnpm install --tag beta\fR, npm will still install a version matching \fB^1.0.0\fR even if the \fBbeta\fR tag points to a different version. To install a tagged version, specify the package explicitly: \fBnpm install foo@beta\fR..PThe \fB--dry-run\fR argument will report in the usual way what the install would have done without actually installing anything..PThe \fB--package-lock-only\fR argument will only update the \fBpackage-lock.json\fR, instead of checking \fBnode_modules\fR and downloading dependencies..PThe \fB-f\fR or \fB--force\fR argument will force npm to fetch remote resources even if a local copy exists on disk..P.RS 2.nfnpm install sax --force.fi.RE.SS "Configuration".PSee the npm help config help doc. Many of the configuration params have some effect on installation, since that's most of what npm does..PThese are some of the most common options related to installation..SS "\fBsave\fR".RS 0.IP \(bu 4Default: \fBtrue\fR unless when using \fBnpm update\fR where it defaults to \fBfalse\fR.IP \(bu 4Type: Boolean.RE 0 .PSave installed packages to a \fBpackage.json\fR file as dependencies..PWhen used with the \fBnpm rm\fR command, removes the dependency from \fBpackage.json\fR..PWill also prevent writing to \fBpackage-lock.json\fR if set to \fBfalse\fR..SS "\fBsave-exact\fR".RS 0.IP \(bu 4Default: false.IP \(bu 4Type: Boolean.RE 0 .PDependencies saved to package.json will be configured with an exact version rather than using npm's default semver range operator..SS "\fBglobal\fR".RS 0.IP \(bu 4Default: false.IP \(bu 4Type: Boolean.RE 0 .POperates in "global" mode, so that packages are installed into the \fBprefix\fR folder instead of the current working directory. See npm help folders for more on the differences in behavior..RS 0.IP \(bu 4packages are installed into the \fB{prefix}/lib/node_modules\fR folder, instead of the current working directory..IP \(bu 4bin files are linked to \fB{prefix}/bin\fR.IP \(bu 4man pages are linked to \fB{prefix}/share/man\fR.RE 0 .SS "\fBinstall-strategy\fR".RS 0.IP \(bu 4Default: "hoisted".IP \(bu 4Type: "hoisted", "nested", "shallow", or "linked".RE 0 .PSets the strategy for installing packages in node_modules. hoisted (default): Install non-duplicated in top-level, and duplicated as necessary within directory structure. nested: (formerly --legacy-bundling) install in place, no hoisting. shallow (formerly --global-style) only install direct deps at top-level. linked: (experimental) install in node_modules/.store, link in place, unhoisted..SS "\fBlegacy-bundling\fR".RS 0.IP \(bu 4Default: false.IP \(bu 4Type: Boolean.IP \(bu 4DEPRECATED: This option has been deprecated in favor of \fB--install-strategy=nested\fR.RE 0 .PInstead of hoisting package installs in \fBnode_modules\fR, install packages in the same manner that they are depended on. This may cause very deep directory structures and duplicate package installs as there is no de-duplicating. Sets \fB--install-strategy=nested\fR..SS "\fBglobal-style\fR".RS 0.IP \(bu 4Default: false.IP \(bu 4Type: Boolean.IP \(bu 4DEPRECATED: This option has been deprecated in favor of \fB--install-strategy=shallow\fR.RE 0 .POnly install direct dependencies in the top level \fBnode_modules\fR, but hoist on deeper dependencies. Sets \fB--install-strategy=shallow\fR..SS "\fBomit\fR".RS 0.IP \(bu 4Default: 'dev' if the \fBNODE_ENV\fR environment variable is set to 'production'; otherwise, empty..IP \(bu 4Type: "dev", "optional", or "peer" (can be set multiple times).RE 0 .PDependency types to omit from the installation tree on disk..PNote that these dependencies \fIare\fR still resolved and added to the \fBpackage-lock.json\fR or \fBnpm-shrinkwrap.json\fR file. They are just not physically installed on disk..PIf a package type appears in both the \fB--include\fR and \fB--omit\fR lists, then it will be included..PIf the resulting omit list includes \fB'dev'\fR, then the \fBNODE_ENV\fR environment variable will be set to \fB'production'\fR for all lifecycle scripts..SS "\fBinclude\fR".RS 0.IP \(bu 4Default:.IP \(bu 4Type: "prod", "dev", "optional", or "peer" (can be set multiple times).RE 0 .POption that allows for defining which types of dependencies to install..PThis is the inverse of \fB--omit=<type>\fR..PDependency types specified in \fB--include\fR will not be omitted, regardless of the order in which omit/include are specified on the command-line..SS "\fBstrict-peer-deps\fR".RS 0.IP \(bu 4Default: false.IP \(bu 4Type: Boolean.RE 0 .PIf set to \fBtrue\fR, and \fB--legacy-peer-deps\fR is not set, then \fIany\fR conflicting \fBpeerDependencies\fR will be treated as an install failure, even if npm could reasonably guess the appropriate resolution based on non-peer dependency relationships..PBy default, conflicting \fBpeerDependencies\fR deep in the dependency graph will be resolved using the nearest non-peer dependency specification, even if doing so will result in some packages receiving a peer dependency outside the range set in their package's \fBpeerDependencies\fR object..PWhen such an override is performed, a warning is printed, explaining the conflict and the packages involved. If \fB--strict-peer-deps\fR is set, then this warning is treated as a failure..SS "\fBprefer-dedupe\fR".RS 0.IP \(bu 4Default: false.IP \(bu 4Type: Boolean.RE 0 .PPrefer to deduplicate packages if possible, rather than choosing a newer version of a dependency..SS "\fBpackage-lock\fR".RS 0.IP \(bu 4Default: true.IP \(bu 4Type: Boolean.RE 0 .PIf set to false, then ignore \fBpackage-lock.json\fR files when installing. This will also prevent \fIwriting\fR \fBpackage-lock.json\fR if \fBsave\fR is true..SS "\fBpackage-lock-only\fR".RS 0.IP \(bu 4Default: false.IP \(bu 4Type: Boolean.RE 0 .PIf set to true, the current operation will only use the \fBpackage-lock.json\fR, ignoring \fBnode_modules\fR..PFor \fBupdate\fR this means only the \fBpackage-lock.json\fR will be updated, instead of checking \fBnode_modules\fR and downloading dependencies..PFor \fBlist\fR this means the output will be based on the tree described by the \fBpackage-lock.json\fR, rather than the contents of \fBnode_modules\fR..SS "\fBforeground-scripts\fR".RS 0.IP \(bu 4Default: \fBfalse\fR unless when using \fBnpm pack\fR or \fBnpm publish\fR where it defaults to \fBtrue\fR.IP \(bu 4Type: Boolean.RE 0 .PRun all build scripts (ie, \fBpreinstall\fR, \fBinstall\fR, and \fBpostinstall\fR) scripts for installed packages in the foreground process, sharing standard input, output, and error with the main npm process..PNote that this will generally make installs run slower, and be much noisier, but can be useful for debugging..SS "\fBignore-scripts\fR".RS 0.IP \(bu 4Default: false.IP \(bu 4Type: Boolean.RE 0 .PIf true, npm does not run scripts specified in package.json files..PNote that commands explicitly intended to run a particular script, such as \fBnpm start\fR, \fBnpm stop\fR, \fBnpm restart\fR, \fBnpm test\fR, and \fBnpm run\fR will still run their intended script if \fBignore-scripts\fR is set, but they will \fInot\fR run any pre- or post-scripts..SS "\fBallow-git\fR".RS 0.IP \(bu 4Default: "all".IP \(bu 4Type: "all", "none", or "root".RE 0 .PLimits the ability for npm to fetch dependencies from git references. That is, dependencies that point to a git repo instead of a version or semver range. Please note that this could leave your tree incomplete and some packages may not function as intended or designed..P\fBall\fR allows any git dependencies to be fetched and installed. \fBnone\fR prevents any git dependencies from being fetched and installed. \fBroot\fR only allows git dependencies defined in your project's package.json to be fetched installed. Also allows git dependencies to be fetched for other commands like \fBnpm view\fR.SS "\fBaudit\fR".RS 0.IP \(bu 4Default: true.IP \(bu 4Type: Boolean.RE 0 .PWhen "true" submit audit reports alongside the current npm command to the default registry and all registries configured for scopes. See the documentation for npm help audit for details on what is submitted..SS "\fBbefore\fR".RS 0.IP \(bu 4Default: null.IP \(bu 4Type: null or Date.RE 0 .PIf passed to \fBnpm install\fR, will rebuild the npm tree such that only versions that were available \fBon or before\fR the given date are installed. If there are no versions available for the current set of dependencies, the command will error..PIf the requested version is a \fBdist-tag\fR and the given tag does not pass the \fB--before\fR filter, the most recent version less than or equal to that tag will be used. For example, \fBfoo@latest\fR might install \fBfoo@1.2\fR even though \fBlatest\fR is \fB2.0\fR..PThis config cannot be used with: \fBmin-release-age\fR.SS "\fBmin-release-age\fR".RS 0.IP \(bu 4Default: null.IP \(bu 4Type: null or Number.RE 0 .PIf set, npm will build the npm tree such that only versions that were available more than the given number of days ago will be installed. If there are no versions available for the current set of dependencies, the command will error..PThis flag is a complement to \fBbefore\fR, which accepts an exact date instead of a relative number of days..PThis config cannot be used with: \fBbefore\fR.SS "\fBbin-links\fR".RS 0.IP \(bu 4Default: true.IP \(bu 4Type: Boolean.RE 0 .PTells npm to create symlinks (or \fB.cmd\fR shims on Windows) for package executables..PSet to false to have it not do this. This can be used to work around the fact that some file systems don't support symlinks, even on ostensibly Unix systems..SS "\fBfund\fR".RS 0.IP \(bu 4Default: true.IP \(bu 4Type: Boolean.RE 0 .PWhen "true" displays the message at the end of each \fBnpm install\fR acknowledging the number of dependencies looking for funding. See npm help fund for details..SS "\fBdry-run\fR".RS 0.IP \(bu 4Default: false.IP \(bu 4Type: Boolean.RE 0 .PIndicates that you don't want npm to make any changes and that it should only report what it would have done. This can be passed into any of the commands that modify your local installation, eg, \fBinstall\fR, \fBupdate\fR, \fBdedupe\fR, \fBuninstall\fR, as well as \fBpack\fR and \fBpublish\fR..PNote: This is NOT honored by other network related commands, eg \fBdist-tags\fR, \fBowner\fR, etc..SS "\fBcpu\fR".RS 0.IP \(bu 4Default: null.IP \(bu 4Type: null or String.RE 0 .POverride CPU architecture of native modules to install. Acceptable values are same as \fBcpu\fR field of package.json, which comes from \fBprocess.arch\fR..SS "\fBos\fR".RS 0.IP \(bu 4Default: null.IP \(bu 4Type: null or String.RE 0 .POverride OS of native modules to install. Acceptable values are same as \fBos\fR field of package.json, which comes from \fBprocess.platform\fR..SS "\fBlibc\fR".RS 0.IP \(bu 4Default: null.IP \(bu 4Type: null or String.RE 0 .POverride libc of native modules to install. Acceptable values are same as \fBlibc\fR field of package.json.SS "\fBworkspace\fR".RS 0.IP \(bu 4Default:.IP \(bu 4Type: String (can be set multiple times).RE 0 .PEnable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option..PValid values for the \fBworkspace\fR config are either:.RS 0.IP \(bu 4Workspace names.IP \(bu 4Path to a workspace directory.IP \(bu 4Path to a parent workspace directory (will result in selecting all workspaces within that folder).RE 0 .PWhen set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project..PThis value is not exported to the environment for child processes..SS "\fBworkspaces\fR".RS 0.IP \(bu 4Default: null.IP \(bu 4Type: null or Boolean.RE 0 .PSet to true to run the command in the context of \fBall\fR configured workspaces..PExplicitly setting this to false will cause commands like \fBinstall\fR to ignore workspaces altogether. When not set explicitly:.RS 0.IP \(bu 4Commands that operate on the \fBnode_modules\fR tree (install, update, etc.) will link workspaces into the \fBnode_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fIunless\fR one or more workspaces are specified in the \fBworkspace\fR config..RE 0 .PThis value is not exported to the environment for child processes..SS "\fBinclude-workspace-root\fR".RS 0.IP \(bu 4Default: false.IP \(bu 4Type: Boolean.RE 0 .PInclude the workspace root when workspaces are enabled for a command..PWhen false, specifying individual workspaces via the \fBworkspace\fR config, or all workspaces via the \fBworkspaces\fR flag, will cause npm to operate only on the specified workspaces, and not on the root project..PThis value is not exported to the environment for child processes..SS "\fBinstall-links\fR".RS 0.IP \(bu 4Default: false.IP \(bu 4Type: Boolean.RE 0 .PWhen set file: protocol dependencies will be packed and installed as regular dependencies instead of creating a symlink. This option has no effect on workspaces..SS "Algorithm".PGiven a \fBpackage{dep}\fR structure: \fBA{B,C}, B{C}, C{D}\fR, the npm install algorithm produces:.P.RS 2.nfA+-- B+-- C+-- D.fi.RE.PThat is, the dependency from B to C is satisfied by the fact that A already caused C to be installed at a higher level. D is still installed at the top level because nothing conflicts with it..PFor \fBA{B,C}, B{C,D@1}, C{D@2}\fR, this algorithm produces:.P.RS 2.nfA+-- B+-- C `-- D@2+-- D@1.fi.RE.PBecause B's D@1 will be installed in the top-level, C now has to install D@2 privately for itself. This algorithm is deterministic, but different trees may be produced if two dependencies are requested for installation in a different order..PSee npm help folders for a more detailed description of the specific folder structures that npm creates..SS "See Also".RS 0.IP \(bu 4npm help folders.IP \(bu 4npm help update.IP \(bu 4npm help audit.IP \(bu 4npm help fund.IP \(bu 4npm help link.IP \(bu 4npm help rebuild.IP \(bu 4npm help scripts.IP \(bu 4npm help config.IP \(bu 4npm help npmrc.IP \(bu 4npm help registry.IP \(bu 4npm help dist-tag.IP \(bu 4npm help uninstall.IP \(bu 4npm help shrinkwrap.IP \(bu 4\fBpackage.json\fR \fI\(la/configuring-npm/package-json\(ra\fR.IP \(bu 4npm help workspaces.RE 0