[TIL] Node: specifying the versions a package works on
TIL about configuration engines in package.json, which can be used as a
best-practice for explicitly specifying under what versions of node and npm
a package can be installed:
"engines": { "node": ">= 6.0.0", "npm": ">= 3.0.0" },Note:
- This applies only to packages and is related to the moment a package is
installed with
npm installas package (e.g., from one directory up), and notnpm installinside a project (which installs the dependencies of the project).
See: