4 ms·
...aren't there at least two or three package managers (npm, yarn, maybe pnpm)? I'm not sure about yarn, but pnpm has exactly the same API as npm has. It simpl
by jessaustin 4y ago
...aren't there at least two or three package managers (npm, yarn, maybe pnpm)?
I'm not sure about yarn, but pnpm has exactly the same API as npm has. It simply has a different disk organization and caching strategy. If npm maintainers so chose, pnpm's behavior would be an option within npm. Since they haven't chosen that, it seems completely reasonable to "compete" in the way that pnpm does.
- KyeRussell 4y agoYes, but one has to come to that conclusion oneself, which increases friction. I realise you’re talking about pnpm, and not yarn, but when I think of issues like this, yarn is what comes to mind. A bunch of projects prefer yarn over npm, or at the very least place them side by side, in the project documentation. As someone reasonably familiar with JavaScript, but that only works with it sporadically, I always find myself going back and trying to reverse-engineer the reasoning, and I’m never entirely confident. So when I circle back to my 6-monthly journey into writing some JavaScript, and see another thing called “pnpm” making its way into package installation docs, I cannot be blamed for sighing and being a little irked. Especially since my daily driver is Python, so I’ve got loads of packaging trauma.
- Aeolun 4y agoI think the nice thing about the node ecosystem is that all the packaging tools are using the exact same package.json. The only thing that’s different is the way they resolve/install the packages.
- solarkraft 4y agoYarn has a sightly nicer CLI than npm and (I think) innovated a bit more quickly. pnpm mitigates the node_modules problem while otherwise just being npm. You can usually substitute the package manager in the docs with your favorite, but in doubt just use the one they use.
- solarkraft 4y agoYarn used to be compatible with npm package files too. But now that it's moving away from it I probably won't use it anymore; the advantages it brings are not worth the incompatibility.