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 install
as package (e.g., from one directory up), and notnpm install
inside a project (which installs the dependencies of the project).
See: