Hacker News new | ask | show | jobs
by dima55 3521 days ago
They absolutely should not be wrapping npm. npm is attempting to do a job that package managers should be doing to begin with
2 comments

The problem is that there is no single package manager that covers every platform. If you are writing an inherently portable library in node.js, as an author, are you supposed to also provide packages for RPM, dpkg, pacman, brew etc? Or do you expect distros to package every tiny thing?

So in practice there is a niche that npm covers, that wouldn't be filled if we removed it.

On the question of whether the system package manager should wrap npm - the reason why you want to do so is because it lets npm dependency resolution work regardless of how packages are installed. If the system package manager just does its own thing, then next time you do need to npm install a package (because it's a relatively obscure package that's not in your distro), you don't want it to install copies (or worse, yet overwrite) all the dependencies that you've already installed by other means.

Real package managers should be left to manage system packages, where packages are often supported for a few years.

Package managers for scripting languages and similar should be left to manage user-wide packages, or virtualenv-wide for webapps.