You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/cli/v11/commands/npm-install.mdx
-4Lines changed: 0 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -95,7 +95,6 @@ Even if you never publish your package, you can still get a lot of benefits of u
95
95
Install 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 link`](/cli/v11/commands/npm-link).
96
96
97
97
Tarball requirements:
98
-
99
98
- The filename _must_ use `.tar`, `.tar.gz`, or `.tgz` as the extension.
100
99
- The package contents should reside in a subfolder inside the tarball (usually it is called `package/`). npm strips one directory layer when installing the package (an equivalent of `tar x --strip-components=1` is run).
101
100
- The package must contain a `package.json` file with `name` and `version` properties.
@@ -129,7 +128,6 @@ Even if you never publish your package, you can still get a lot of benefits of u
129
128
```
130
129
131
130
`npm install` saves any specified packages into `dependencies` by default. Additionally, you can control where and how they get saved with some additional flags:
132
-
133
131
-`-P, --save-prod`: Package will appear in your `dependencies`. This is the default unless `-D` or `-O` are present.
134
132
135
133
-`-D, --save-dev`: Package will appear in your `devDependencies`.
@@ -141,7 +139,6 @@ Even if you never publish your package, you can still get a lot of benefits of u
141
139
-`--no-save`: Prevents saving to `dependencies`.
142
140
143
141
When using any of the above options to save dependencies to your package.json, there are two additional, optional flags:
144
-
145
142
-`-E, --save-exact`: Saved dependencies will be configured with an exact version rather than using npm's default semver range operator.
146
143
147
144
-`-B, --save-bundle`: Saved dependencies will also be added to your `bundleDependencies` list.
@@ -229,7 +226,6 @@ Even if you never publish your package, you can still get a lot of benefits of u
229
226
If the package being installed contains a `prepare` script, its `dependencies` and `devDependencies` will be installed, and the prepare script will be run, before the package is packaged and installed.
230
227
231
228
The following git environment variables are recognized by npm and will be added to the environment when running git:
-`npm profile set password`: Change your password. This is interactive, you'll be prompted for your current password and a new password. You'll also be prompted for an OTP if you have two-factor authentication enabled.
-`auth-only`: Require an OTP when logging in or making changes to your account's authentication. The OTP will be required on both the website and the command line.
75
74
-`auth-and-writes`: Requires an OTP at all the times `auth-only` does, and also requires one when publishing a module, setting the `latest` dist-tag, or changing access via `npm access` and `npm owner`.
0 commit comments