-
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
Clarify recommended package manager #1645
Comments
Same apply for npm, do you think we should remove both?
Yarn, npm, and Node.js are three distinct projects, with different goals. Node.js users should use whatever suits their use case and their own preference (none, both, another package manager such as pnpm, etc.). |
Since this is specifically about the Docker images I'm going to transfer this over to https://github.com/nodejs/docker-node as the Docker working group has autonomy for what goes into those images. |
I am a strong advocate for the removal of both package managers from the blessed Docker images. Package managers introduce a dependency surface area which makes the It makes much more sense to me to install the package manager that a specific project needs as part of that specific project's build steps than to have multiple package managers included in a base image, as package mangers are a project specific dev dependency. Otherwise, users are exposed to these sorts of annoying issues: npm/cli#3785 by default. |
Discussion about no package manager is duplicate of #404. (and note that node itself is embracing more than just npm, ref https://nodejs.org/api/corepack.html, which is available in the current LTS). I think we should close this issue, whatever discussion comes out of it are covered in other, existent issues. /cc @nodejs/docker |
This patch enables Corepack, allowing to use pnpm directly and unbundling yarn from the default image. Removing yarn also simplifies the image and the maintainance. This change as been discussed in nodejs#777. Closes nodejs#777, nodejs#1645, nodejs#1755.
This patch enables Corepack, allowing to use pnpm directly and unbundling yarn from the default image. Removing yarn also simplifies the image and the maintenance. This change has been discussed in nodejs#777. Closes nodejs#777, nodejs#1645, nodejs#1755.
This patch enables Corepack, allowing to use pnpm directly and unbundling yarn from the default image. Removing yarn also simplifies the image and the maintenance. This change has been discussed in nodejs#777. Closes nodejs#777, nodejs#1645, nodejs#1755.
Node.js still comes with npm as the default package manager. And the official Node.js online documentation continues to list npm commands. However, the official Node.js Docker Hub images strangely contain yarn by default, which is not lockfile compatible with npm.
So which of these two package managers should Node.js users be using? If the answer is npm, then would be good to drop yarn from the next major Node.js release series tags on Docker Hub, in order to provide leaner images. This reduces confusion, storage costs, and network bills.
The text was updated successfully, but these errors were encountered: