yarn install v1.22.19
[1/4] Resolving packages…
[2/4] Fetching packages…
error @achrinza/[email protected]: The engine "node" is incompatible with this module. Expected version "8 || 9 || 10 || 11 || 12 || 13 || 14 || 15 || 16 || 17 || 18 || 19". Got "20.9.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
my node version is 20, do I need to install node v19 for this?
2
Answers
That the installation exits with this error means that it can be workable but this is not guaranteed because package version doesn’t explicitly support Node 20.
In case of any doubt package readme needs to be checked:
This means that the project is forced to be used with not recent package version and was developed with older versions of Node.
Node 19 and other odd versions shouldn’t be used without a good reason because they are not LTS and not widely supported by third-party packages.
Downgrading to the previous Node LTS (18 at this moment) can be suggested for better compatibility, unless there are other restrictions in the project. Downgrading Node version also requires to completely reinstall the dependencies in other projects on this machine as
node_modules
commonly depends on Node version it was installed for.the package has support for node v20, support Node.js v20 engine, merged PR, try to install the latest version of package.
The problem maybe in your
package.json
, check if you haveengines
section, if yes, update it to20.x.x