Do you want to request a feature or report a bug?
What is the current behavior?
.yarnrc or use yarn --ignore-engines If the current behavior is a bug, please provide the steps to reproduce.
yarn and observe outputnpm i and observe outputWhat is the expected behavior?
Please mention your node.js, yarn and operating system version.
This behavior has been in Yarn since its inception (and was actually sold as an improvement over npm). I'm not convinced changing it now would be a good idea.
My hope is that most package authors would accurately set the engines field based on the node calls they're making or at least update the minor semver for an engines change. However, some authors only CI test with the latest patch of each major revision of node and don't want to update semver for what is essentially a toolchain change.
Yarn users currently have the options of toss an error on any mismatch or completely ignore all engine values. It would be nice if we had a middle ground here. Either the ability to ignore engines for a specific module or change engine errors to warnings.
Just to clarify, in my own case, I am currently working through some CI challenges that prevent me from properly using yarn.lock. Once I get these CI challenges resolved, I don't expect this issue to be a problem.
We already use fixed version numbers in our package.json, but these issues are bleeding in from nested dependencies.
I've tried using the resolutions feature to work around this, but I have dependencies using different major versions of the same package which causes problems.
Looks like the soft option was already discussed and discarded here https://github.com/yarnpkg/rfcs/pull/69#issuecomment-308567694
This is by design. Use --ignore-engines to ignore the engines check.
Most helpful comment
This is by design. Use
--ignore-enginesto ignore the engines check.