Skip to content

Commit 4864dd4

Browse files
Max Blackowlstronaut
authored andcommitted
docs(npm-install): document engines field priority when installing packages
1 parent 95d25cd commit 4864dd4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/lib/content/commands/npm-install.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ Even if you never publish your package, you can still get a lot of benefits of u
9595
9696
In most cases, this will install the version of the modules tagged as `latest` on the npm registry.
9797
98+
**Note:** 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 `engines` field. If the `latest` 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 `engines` compatibility, explicitly specify the version or tag: `npm install <name>@latest`.
99+
98100
Example:
99101

100102
```bash

0 commit comments

Comments
 (0)