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

[Bug?]: selective binary by OS and Node version #6565

Closed
1 task
rtritto opened this issue Oct 21, 2024 · 3 comments
Closed
1 task

[Bug?]: selective binary by OS and Node version #6565

rtritto opened this issue Oct 21, 2024 · 3 comments
Labels
bug Something isn't working external bug This issue highlights a bug in another project

Comments

@rtritto
Copy link

rtritto commented Oct 21, 2024

Self-service

  • I'd be willing to implement a fix

Describe the bug

After uWebSockets.js is installed, all OS and Node versions are built.

To reproduce

  • yarn init -y
  • yarn set version berry
  • yarn add uWebSockets.js@github:uNetworking/uWebSockets.js#v20.49.0
  • open directory /.yarn/unplugged/uWebSockets.js-https-<HASH>/node_modules/uWebSockets.js
  • .node files are 24 (uws_darwin_, uws_linux, uws_win32*)

Expected

In directory /.yarn/unplugged/uWebSockets.js-https-<HASH>/node_modules/uWebSockets.js there is only 1 file filtered by OS and Node version

Environment

System:
OS: Windows 11 10.0.22631
Binaries:
Node: 22.9.0 - ~\AppData\Local\Temp\xfs-7275780b\node.CMD
Yarn: 4.5.1 - ~\AppData\Local\Temp\xfs-7275780b\yarn.CMD
npm: 10.8.3 - C:\Program Files\nodejs\npm.CMD

Additional context

Related comment uNetworking/uWebSockets.js#1112 (comment)

@larixer
Copy link
Member

larixer commented Oct 21, 2024

@rtritto Have you tried to specify supportedArchitectures in .yarnrc.yml?
https://yarnpkg.com/configuration/yarnrc#supportedArchitectures

@rtritto
Copy link
Author

rtritto commented Oct 21, 2024

There is a way to autodetect? In the CI, I'm using Windows and Linux.

@larixer
Copy link
Member

larixer commented Oct 21, 2024

@rtritto It's not an issue in Yarn Berry or any other package manager. The issue is how uNetworking/uWebSockets.js is distributed. They don't use os and cpu fields of package.json and instead distribute all platform specific files in a single package:
https://github.com/uNetworking/uWebSockets.js/tree/v20.49.0

@larixer larixer closed this as completed Oct 21, 2024
@larixer larixer added the external bug This issue highlights a bug in another project label Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working external bug This issue highlights a bug in another project
Projects
None yet
Development

No branches or pull requests

2 participants