-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
strict engines check is inconsistent with npm #6627
Comments
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 yarnpkg/rfcs#69 (comment) |
This is by design. Use |
See https://docs.npmjs.com/misc/semver#ranges Comma is not a valid semver range separator. The invalid range breaks yarn installations as yarn [does strict `engines` check](yarnpkg/yarn#6627).
This issue should be re opened, yarn can brake massive amount of build just because an engine field mistake |
We don't have this behavior anymore since 2.0, published a year and a half ago 😉 |
Do you want to request a feature or report a bug?
What is the current behavior?
.yarnrc
or useyarn --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.
The text was updated successfully, but these errors were encountered: