Skip to content
This repository has been archived by the owner on Dec 16, 2019. It is now read-only.

Relax or remove the node engine check from package.json #339

Closed
michaelwnelson opened this issue Apr 6, 2017 · 1 comment
Closed

Relax or remove the node engine check from package.json #339

michaelwnelson opened this issue Apr 6, 2017 · 1 comment

Comments

@michaelwnelson
Copy link
Contributor

npm has removed support for "engineStrict": true in package.json and what you put in engines in package.json is purely advisory.

Unfortunately, Yarn went in a opposite direction and actually enforces the check unless you pass the --ignore-engines flag. This means people with the latest yarn installed are unable to yarn add angularjs-dropdown-multiselect until they learn about this flag.

Example of the error:

$ yarn add angularjs-dropdown-multiselect
yarn add v0.19.1
[1/4] Resolving packages...
[2/4] Fetching packages...
error angularjs-dropdown-multiselect@1.10.2: The engine "node" is incompatible with this module. Expected version "0.10.10".
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

So, I think the engines field of package.json should either removed completely or at least relaxed to the following:

"engines": {
    "nodes": ">=0.10.10"
}
@drewfreyling
Copy link

Will this be backported for v1 consumers? Since 2 is still in beta?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants