-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Decision about yarn in version 21 of Node #1979
Comments
There have been a lot of responses to feature requests in this repo along the lines of "we ship what Node.js ships, and nothing more". I believe this stance is very reasonable for the official Node.js images. I also think that implies yarn should not be shipped, or it would be inconsistent. As discussed in #777 and other issues, package managers (and that includes npm) contribute a lot to the image size especially for Alpine-based images. If we can't decide on a variant for multi-stage builds that ships entirely without any package managers, perhaps we can find common ground by at least eliminating yarn. One could make the argument that a lot of people are using yarn, but then again, a lot of people are using pnpm, and recently maybe bun, and those aren't included. When defining a custom image, it's really quite simple to add an install command for additional package managers as needed. On the other hand, it can be tricky to remove existing parts of an image without breaking things. As such, I think the default should be an image that includes as little additional stuff as possible. |
I haven't been following what's happening with corepack. If corepack is now on by default in 21, I think it makes it an easier sell that directions on how to use Yarn could be replaced |
Happy to explore the latest one (#1768) - the others are more than 3 years old, so at least to me it doesn't seem to have much momentum/requests behind it. (this is just my personal opinion, tho) |
It seems especially odd that we’d bundle Yarn 1, when the current version is 4. Especially since Yarn 1.x seems to be abandoned and has issues. |
I think it's either you bundle the Node docker image with the popular other package managers (pnpm, yarn, etc) or you just keep it only with |
If nodejs/node#51886 lands, what would happen to the Yarn that’s included in the Docker image? Would we just stop including Yarn 1, and cc @aduh95 @nodejs/corepack |
I've been wanting to remove the preinstalled version and run We could probably then add a "core" version or something with just Node (so removing yarn, corepack, npm, npx etc) for those that don't want the "bloat". We've had requests for that for a long time. |
If we change the symlink to point to Corepack, then there would be no version of Yarn included with the image. It would be downloaded on first use. |
Ah, right! I think that's probably fine. You don't need the package manager unless you're gonna install things, at which point you have internet to download the package manager anyways. If we go with a "core" image as well, we can probably run some command to preinstall, but that's a separate discussion. |
The decision to include yarn into the image has had some mixed reaction and the departure from staying with the default installation of the Node package leads to a lot of disagreement.
Node 21 was just released so we now have the opportunity to not include Yarn by default in this new version and maybe add a variant that has yarn. What do people think?
iMO, this issue should be resolved before adding v21.
The text was updated successfully, but these errors were encountered: