Skip to content
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

v0.33.0: allow installation of precompiled binaries with yarn@1 #3871

Closed
ForsakenHarmony opened this issue Nov 29, 2023 · 4 comments
Closed

Comments

@ForsakenHarmony
Copy link

Feature request

What are you trying to achieve?

yarn add sharp with yarn v1.22.19

Is there any reason to not allow installation with yarn 1?

@lovell
Copy link
Owner

lovell commented Nov 29, 2023

You may need to add the --ignore-engines flag for old versions of yarn.

Please see #3750 for the full context.

@lovell lovell changed the title allow installation of precompiled binaries with yarn@1 v0.33.0: allow installation of precompiled binaries with yarn@1 Nov 29, 2023
@mceachen
Copy link
Contributor

mceachen commented Dec 1, 2023

@lovell Just upgraded to 0.33.0, but I'm also on yarn (v1). I guess I misread the instructions and tried to add a supportedArchitectures section to my package.json (which v1 doesn't use?)

I'd suggest adding to your installation verbiage that "yarn v1 requires --ignore-engines" and linking to this issue. That would have saved me some time.

@lovell
Copy link
Owner

lovell commented Dec 1, 2023

yarn v1 has been in maintenance mode for almost 4 years. I understand people were (quite rightly) hesitant to upgrade yarn due to all the problems with "plug'n'play", but that feature can and should be switched off by setting nodeLinker to any value other than the default.

Using the --ignore-engines flag with v1 will probably work for many scenarios, but it will download every binary for every platform, which is a huge waste of time, energy, bandwidth etc. If you care about energy conservation then please upgrade to a modern package manager.

For those looking to use yarn for cross-platform installs via its supportedArchitectures feature, that was added in its v3.1.0 release.

@lovell
Copy link
Owner

lovell commented Dec 4, 2023

I've updated the docs via commit 004fff9

If you're using yarn v1 please upgrade and set nodeLinker to anything other than pnp.

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

No branches or pull requests

3 participants