Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error during migration from npm to yarn - The engine "node" is incompatible with this module

in my project I am trying to migrate from npm to yarn.

I simply ran the "yarn" command to generate the "yarn.lock".

During the process, it showed me the following error:

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

Expected version "^12.13.0". Got "10.19.0" error Found incompatible module.

So I ran the command "npm remove linearicons" then "yarn" to generate the "yarn.lock" without error, then "yarn add linearicons". But it gives me the same error as above.

My Yarn version is 1.22.10

Node version : v10.19.0

What could I do to fix this problem? I don't understand what he wants

like image 375
eronn Avatar asked Oct 30 '25 05:10

eronn


2 Answers

Update the node.js version :

Installation of nvm

$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
$ source ~/.bashrc

Looking for existent versions of node.js

$ nvm ls-remote

Installation of the last one (as of today)

$ nvm install v16.8.0

After that your issue should be fixed.

like image 185
Jean-Marc Avatar answered Nov 01 '25 19:11

Jean-Marc


yarn install --ignore-engines

This worked for me, and it was showing this error:

 [email protected]: The engine "node" is incompatible with this module. Expected version ">= 12.13.0". Got "10.19.0"

Final result after --ignore-engines

success Saved lockfile.
like image 26
Simon Berton Avatar answered Nov 01 '25 19:11

Simon Berton



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!