The engine "node" is incompatible with this module. Expected version "> 0.4.x < 0.9.0". Got "12.22.1" ? How to solve this

Viewed 623

In my react native project I am trying to install dependencies with yarn but for link it says

error link@0.1.5: The engine "node" is incompatible with this module. Expected version "> >0.4.x < 0.9.0". Got "12.22.1"

How can I solve this??

1 Answers

As the error says the dependencies you are installing is only meant to run in node version between 0.4.x to 0.9.0. Version for the dependencies is set by the package developer, this can't be changed.

We can have multiple version of node installed in the machine by using nvm. nvm can be downloaded from https://github.com/nvm-sh/nvm for linux and macOS, for windows you can download from https://github.com/coreybutler/nvm-windows

But, this would not solve the issue as there would be other packages or library dependency that would depend on higher version of node. Example react-native is supported in node version >=12.0.

Better solution would be to check for higher version of the dependencies. For to find another library that can achieve the desired result.

Related