react-lines-ellipsis icon indicating copy to clipboard operation
react-lines-ellipsis copied to clipboard

The engine "node" is incompatible with this module. Expected version ">=16". Got "14.18.1"

Open tuantv413 opened this issue 3 years ago • 4 comments

I tried to add [email protected] via yarn but i got this error:

image

does this latest version not be supported on node v14 anymore? pls help take a look. thanks!

tuantv413 avatar Jul 30 '22 08:07 tuantv413

Ah ">= 16" is intended for developing this package. I don't think the users need this. Did you enable the npm engine-strict config?

xiaody avatar Aug 01 '22 07:08 xiaody

Ah ">= 16" is intended for developing this package. I don't think the users need this. Did you enable the npm engine-strict config?

@xiaody no, I didn't enable it. should I enable npm engine-strict?

tuantv413 avatar Aug 02 '22 01:08 tuantv413

Just leave it as default (false).

I've noticed that you are using yarn instead of npm. yarn is by default stricter about engines. It gives you errors unlike npm's warns. You can use the --ignore-engines flag or yarn config set ignore-engines true config.

xiaody avatar Aug 02 '22 02:08 xiaody

@xiaody It seems that package.json’s engines also applies to the consumers of the package, not just developers of the project.

If you want to let users consume this package from Node.js ≤ 16 without compatibility warnings/errors, I suggest removing "engines" from package.json. (It is possible to keep it in the repo and temporarily remove the "engines" field just before running npm publish.)

dtinth avatar Aug 15 '22 05:08 dtinth

@dtinth @tuantv413 You are right. [email protected] is released without engines field.

xiaody avatar Aug 16 '22 04:08 xiaody