-
Notifications
You must be signed in to change notification settings - Fork 145
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
Wishlist on managing package manager versions in a Node.js application #609
Comments
I'm not too happy with the existing title Wishlist on managing package manager versions in a Node.js application, as it's too generic. Do suggest a better one in the comments, if you come across one. |
I think this outcome is the one that should be avoided. Why? Bad defaults. Most people statistically never switch away from defaults, and arguing or urging people to do so causes frustration and a bad experience. Bad defaults cause all sorts of problems, from security, privacy, financial, and so on. So the onus is on Node to provide a good experience. And imo Corepack is a good experience. I have not heard of This whole (sorry for the long rant) |
Don't be sorry for the rant, this is good feedback. Feedback which I think nearly everyone agrees on the goals of. I think the breakdown occurred in a very different way than is made out above though. All that work on If we had a group of corepack maintainers willing to engage on addressing the concerns I personally would love to see us all be able to move forward with the better UX provided by corepack. It just cannot be in a way that forces participation in the way it's implementation does today. And it cannot be without requirements for the package managers (like sourcing the binaries from a trusted source, another of the objections). The last attempt I made to bring these groups together resulted in this PR which made some headway and has resulted in some great changes to the downloads page to feature better instructions and featuring the package managers. I have been way to busy to keep up with this stuff lately, but I have hopes that this sign of progress will be enough to get over the historical baggage. If you are interested in being a part of helping to resolve this please join in on the conversations and help us reach a more balanced consensus agreement. The more voices we have helping push this toward that the better. |
I was going to listen in on the august team meeting, but it was cancelled, which prompted the above post. And unfortunately GitHub doesn't notify me when a subscribed issue (this one) is mentioned somewhere else. Or I just completely missed the 3 other team meetings since then. |
fwiw I saw your comment elsewhere; npmjs.org is indeed more special than every single other option; it's the "most favored package registry" for the foreseeable future. |
Why? Like I have no problem Node/NPM using npmjs.org by default, like for example how Debian has their own package registry too. But I can use my own, or any compatible registry I want, no? The open option to use 3rd party registries is contradictory to npmjs.org being special. I don't get this. It's the default, no argument there, but more special? |
I am not sure if it is a fruitful line of discussion, but I think @ljharb meant that it is special as the ultimate source of truth for such a large majority of packages that it is defacto "special". Not that anything you said is untrue, it just also is a not really important to the discussion at hand. Sorry about the meeting things, it is quite hard to organize these things with volunteers and as such it means it is up to individuals to find/follow the right repos. Not a great setup, but I could also recommend using the OpenJS public calendar which lists all of these. As for the threads in node core, I agree adding more to them now is unlikely to be helpful. I had attempted to move them here where we could better manage them without sending notifications to all the people following all activity on that repo (reduce the workload to keep up for many) but that did not seem to pan out.
Challenging that concern is valid. I am sure there are compromise points which could have been reached around that. As someone who has helped manage the infra for this stuff I personally hold strongly that corepack is designed to enable a decision that is bad for most people and that the defaults are dangerous. If this was a userland project I would just move on with life, but the problem arises when the runtime is pushing this feature as the default experience. Hence all of the strong feedback and dissent. |
Yeah, this where my counter concern comes from. Imo corepack is good, and it solves an important problem of managing package manager versions in a team. So seeing an almost hostile stance towards it from the Node team, made me very concerned (the Have you tried to contact (I hate to say) JS influencers? Like Theo Browne, Matt Pocock, Thdxr. I know Theo is a big corepack fan, reaching out to them could get you to reach a bigger audience of devs. 99.9% of devs don't follow any of this, they don't even know this is a concern you guys have. You could get a lot of insight through this audience, on e.g. why they use corepack. Speaking for myself, I use Node more than I'd like to, and I have never seen any of your surveys, conversations about this prior to Theo's video about corepack's removal. By that point I was all in on corepack and have always moved teams I worked with onto it, because imo it is the nvm of package managers. And it makes me cringe whenever someone installs Node from the .msi, because managing node versions is a solved problem, and this tool made managing package managers a solved problem for me. |
I agree it solves an important problem, but that is separate from everyone's stated concerns about how it is solving that problem. I am not sure what we would gain from asking individual users who are only one of the constituencies the project serves. The different constituencies the project serves can have very different priorities, but what ships with core needs to at least be non-objectionable to most (or hopefully all) of them. Can you help explain what we would gain from speaking to those folks about this issue? As you point out, watching new users fumble with the install is a problem and if you compare the download page of today to what it was before we started this, I hope you agree this work to understand and better document the ways to get setup have been very helpful. I still don't believe we are across the finish line, but I also firmly believe the project made the right decision not turning it on by default. |
Oh it has shipped already I see. Yes I even liked it before the changes you linked from days ago, the fact that the default option is nvm was very welcome by me (Although I became a fnm guy a year ago, sorry ljharb :P). I wish the big green button on the landing page would also default to a version manager, and not just note it below. The in your face CTA should guide towards a version manager. But I accept that as my personal preference. The dedicated As for what benefit to contacting creators would bring. I think it would help cool the waters and reduce hostility between node and its users. Right now the sentiment is very much |
All of this stuff is great feedback which might be better done in an issue or PR to the website so the folks who work on that see it (not sure if they follow along here).
I have seen multiple issues I am deeply involved in get attention from some of these folks and nothing they have done ever helps "reduce hostility". I have reached out to multiple folks who work on this stuff in the past offering to help clear up the message and make sure it is accurate, not once have any of them engaged in a conversation about it before publishing. I would love if the reality were different, but that is not the reality we are in.
We have a few docs on this you can check out: (edit early send! oops) https://github.com/nodejs/next-10/blob/main/CONSTITUENCIES.md |
Is your feature request related to a problem? Please describe.
There are several discussions about managing package manager version in the past.
At the time of writing, i.e. 2024-07-30, Node.js ships experimental corepack which allows pinning the packageManager field in package.json. It's being used in at least tens of thousands of applications searchable in public code.
There has been asks to make corepack stable since May 2022 nodejs/corepack#104
The PR to enable yarn/pnpm corepack binaries by default in nodejs/node#51886, has moved from most approvals to most declines. There's an open PR to remove corepack too at nodejs/node#51981
The tweets about corepack often go viral, like ones by Matt https://twitter.com/search?q=from%3Amattpocockuk%20corepack&src=typed_query, and then some discussions happen Twitter threads which aren't documented.
Here is some wishlist I would like to share:
packageManager
field to break.devEngines
.Describe the solution you'd like
Based on requirements, and consensus in
devEngines
proposal as of July 2024, here is what a good solution may look like:packageManager
field.devEngines
specification, and provide an easy built-in way for users to use it. This can becorepack
or something else. It doesn't matter as long as it ships with Node.js and is easy to use.Over time, if there's data that one specification is better than other, then add doc/runtime deprecations and provide a migration path to the preferred one.
Describe alternatives you've considered
Additional context
Originally posted as a tweet in https://twitter.com/trivikram/status/1818303053902307479.
A GitHub issue was created as per response from @wesleytodd
The text was updated successfully, but these errors were encountered: