npm/Yarn - Troubleshooting
03 May 2018- The engine “node” is incompatible with this module
- npm doesn’t install the version of dependency from package-lock.json
The engine “node” is incompatible with this module
$ yarn install
...[2/4] 🚚 Fetching packages...
error upath@1.0.4: The engine "node" is incompatible with this module. Expected version ">=4 <=9".
error Found incompatible module
solution
$ yarn --ignore-engines
npm doesn’t install the version of dependency from package-lock.json
this can happen if you tried to install that depedency explicitly beforehand
(say, by adding it to dependencies
or devDependencies
in package.json)
but uninstalled it in the end. still incorrect version of that depedency (the
one you specified in package.json) is resolved over and over again.
solution
clean npm cache:
$ npm cache clean --force
$ npm install