Tag Archives: The engine “node” is incompatible with this module

Yarn Error:The engine “node” is incompatible with this module

Today I got an error while installing vue-cli with yarn
../vue-hackernews-2.0> yarn
yarn install v1.12.3
[1/5] Validating package.json…
[2/5] Resolving packages…
[3/5] Fetching packages…
info [email protected]: The platform “win32” is incompatible with this module.
info “[email protected]” is an optional dependency and failed compatibility check. Excluding it from installation.
error [email protected]: The engine “node” is incompatible with this module. Expected version “>=4 <=9”. Got “10.14.2”
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

After this setting, it will work.

yarn config set ignore-engines true

The reason is as follows.

My node.js installer is version 8.2, v8.9 or higher is required to support vue-cli version 3.0 or higher

error [email protected]: The engine “node” is incompatible with this module.

Initialize react project with the following error.

error [email protected]: The engine “node” is incompatible with this module. Expected version “^6.14.0 || ^8.10.0 || >=9.10.0”. Got “8.9.4”
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

This is caused by node version incompatibility, which can be solved by upgrading the node version, or not, with the following command.

npx create-react-app my-app  --use-npm

issues:

https://github.com/facebook/create-react-app/issues/5714

https://github.com/facebook/create-react-app/issues/3974

Problem:

Guys, a few days ago, I installed `yarn` on my Mac just because it’s necessary for a project where I’m involved.

My problem is that, now, when I create a new app with `CRA`, it’s going to use `yarn` instead of `npm`. And, to be honest, I prefer `npm`.

Is there a way to force to use `npm` instead of `yarn`?
Or should I wait until finish the initial setup, then remove the `yarn.lock` file, the `node_modules` folder and then run `npm i`?

Answer:

You can run CRA with `–use-npm` flag to force it to use npm.