How to ensure that a npm dependency does not require a higher node version?

Viewed 241

Say the parent package has a minimum required node version specified in package.json:

"engines": {
  "node": ">=12"
},

Then a dependency is installed that requires a higher node version in its own package.json:

"engines": {
  "node": ">=14"
},

Running npm i, npm ci does not show any error when executed in a Node 12 (or even lower) environment.

How can I detect that the minimum required node version of a dependency is higher than that of the parent package as part of CI?

0 Answers
Related