-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Remove "engines" fields from all package.json files for improved backwards compatibility with unmaintained package managers #4130
Comments
Please ensure you've read and understood #3750 for context. I continue to recommend that those who wish to use yarn as their package manager should upgrade to its latest version. https://mastodon.social/@lovell/111726943907221407 ("They all use Yarn 1, and almost all of them also faced this Yarn bug" and "they don't want to use NPM because it has a lot of bugs" is quite the juxtaposition 😅 .) |
Thanks for the fast reply 😄 I certainly remember NPM issues like packages magically updating themselves when you install new packages, and it was never really possible to stop it happening. I will say I never questioned why people use yarn since I prefer it anyway. To emphasise, I didn't set up Yarn 1 at these companies, that's what they were using before I joined. I was contracting for quite a few years, I've only seen one company using something other than Yarn 1 since 2015. It's still really popular in industry. I think the reality is Yarn is facing it's Python 3 moment, and I'd be surprised if it wasn't the same situation in a decade 😅 I did find and read that PR via git blame etc. - but I can't really work out why the version is set to 3. It seems like it works with yarn 1 - as long as that flag is provided - and the only issue is that the minimum engine is set higher than it needs to be. At least locally, I only have the binaries that are strictly necessary. What are the actual issues stopping the engine requirement being lower? |
I did a quick search for the sort of error message that yarn v1 users might see to assess the impact: https://github.com/search?q=%22The+engine+glibc+appears+to+be+invalid%22&type=issues Clearly this is causing some pain for other open source maintainers, so for that reason let's see what we can do. I think the easiest thing to do is remove the I'm still of the opinion that the sooner someone presses the official end-of-life button on yarn v1, the better. The maintainers of the official Node Docker images are considering removing it - see nodejs/docker-node#1979 |
Work-in-progress for this is at 7146a9c but it will depend on lovell/sharp-libvips@459b35f and newer, not-yet-published versions of the |
v0.33.5 now available using only values for the |
Thank you! 🤩 |
@lovell is the expectation for people on yarn v1 that they add the pre-built packages to their package.json? I'm firstly getting warnings like
Followed by
It's not problem for us to add these packages - but I was wondering if that's the expected way to do things now |
Please upgrade to v0.33.5 |
That was the fix! Some other package was pulling in an older version, managed to resolve it |
Interesting issue 👀 For those projects who still have not yet managed to migrate away from the legacy Yarn v1 version, does lovell/sharp-libvips@459b35f and the Right now, in such projects, we're always running We plan to migrate from Yarn v1 to pnpm, but haven't gotten around to it in all repos yet. |
sharp v0.33.5 removes the need for |
Definitely agreed that Yarn v1 needs to be migrated away from - companies and projects still stuck on it need to invest. Probably would even be good to see more hard incompatibilities (no workarounds) to motivate companies to switch faster. |
In PR #63321, we bumped sharp@0.33.3 which dropped support for yarn@1. However, it looks like sharp@0.33.5 now supports yarn@1 again as seen in lovell/sharp#4130 (comment)
In PR vercel#63321, we bumped sharp@0.33.3 which dropped support for yarn@1. However, it looks like sharp@0.33.5 now supports yarn@1 again as seen in lovell/sharp#4130 (comment)
Is it possible to better support Yarn v1?
I speak from having the exact same experience at my last 6 or 7 companies: they don't want to use NPM because it has a lot of bugs throughout the versions. They all use Yarn 1, and almost all of them also faced this Yarn bug stopping them running
yarn add
. Everyone who did face it just ignores it by manually adding packages to thepackage.json
, then runningyarn
. There is no appetite for upgrading to yarn 3The docs suggest
yarn add sharp --ignore-engines
. As mentioned earlier,yarn add
doesn't work for a lot of peopleHappy to help out if some context is provided why yarn 3 was put as the minimum version
(Node v20.11.0)
The text was updated successfully, but these errors were encountered: