"npm clean-install" ignores strict-engine check

Viewed 889

I have a project is which I want the developpers to use a specific version of node (the current LTS). According to the documentation, the engines property should do the trick, so I set it like so :

"engines": {
  "node": ">=12.16.1 <13.0.0"
}

And works great when using npm install (I had to set "engine-strict=true" in the .npmrc file) :

$ npm i
npm ERR! code ENOTSUP
npm ERR! notsup Unsupported engine for myApp@1.0.0: wanted: {"node":">=12.16.1 <13.0.0"} (current: {"node":"11.13.0","npm":"6.7.0"})
npm ERR! notsup Required: {"node":">=12.16.1 <13.0.0"}
npm ERR! notsup Actual: {"npm":"6.7.0","node":"11.13.0"}

However, the strict check is ignored when using npm clean-install :

$ npm clean-install
npm WARN prepare removing existing node_modules/ before installation
[...]
added XXX packages in YYYs

0 Answers
Related