-
Notifications
You must be signed in to change notification settings - Fork 39
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
Building fails on node v20 when using yarn #58
Comments
Hi again, I did some more digging on this issue and it seems the problem started with npm/cli@3a7378d that removed Now, 94db31e fixed this issue for packages that depends on A quick and easy solution/workaround would be to use Thanks! |
Sounds good to me. That works on all later npm versions? |
So isn't the real bug that yarn can't find |
I just tested it with the following combinations of node and npm:
Which is basically the npm version that came bundled with the official docker image of each major version of Node that is still supported, plus the latest npm version (upgrading via I don't know if there's any other combinations of versions that I'm missing and that are also relevant. |
Yes, that is the real bug indeed and the ideal solution would be to fix it there, but yarn v1 is no longer maintained even though, unfortunately, it's still bundled with most common distribution methods for Node[0][1]. There is one argument in favor of fixing it here, though: when a package is not using But I guess one could also argue that the proper fix then would be to somehow prevent yarn's logic from breaking (although I have the feeling that that would require a much bigger code change here).
Yes, it's also a bit ironic too 😄. I'm also happy to implement a different solution if we can come up with one that makes sense to everybody. [0] For example, this is the latest official docker container for Node v20:
[1] And this is an installation of yarn using the latest Node LTS:
|
Packages that use
node-gyp-build
fail to install on node v20 when using yarn in the case where they don't bundle prebuilds for the platform already (i.e. when building is needed).Using
leveldown
as an example (but the same happens withsodium-native
,rocksdb
,node-lmdb
, etc):Here the
npm_config_build_from_source
env variable is set totrue
to emulate the behaviour of--build-from-source
on NPM.When no building is needed, everything works as expected:
The text was updated successfully, but these errors were encountered: