3 ms·
Well (I think) part of the whole point of a package manager is to reduce space by sharing dependencies. Npm seems to actually store a copy of the dependency in
by samdroid 12y ago
Well (I think) part of the whole point of a package manager is to reduce space by sharing dependencies. Npm seems to actually store a copy of the dependency individually for each package that requires it. I really think that is inefficient and a step backwards.
- sonofsam 12y agoThis is where most Linux package managers do a really good job. However, the system should be designed in a manner where I have a choice. This here: https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard Makes no sense in a world of dynamically linked libraries and 6 month release cycles.
- vially 12y agoA good package manager should allow to: -share dependencies -provide a way to install multiple versions of the same package These requirements are not mutually exclusive. With a proper file system hierarchy both of them could be accomplished. Most of the popular distribution's package managers (apt, pacman, etc) support the sharing dependencies but almost none of them support installing multiple versions of the package. Given that storage space is very cheap nowadays I think a package manager like NPM which stores copies of the dependencies is not that bad actually.
- nawitus 12y agoYes, npm uses more space than what is necessary, but luckily disk space is cheap. That said, npm does optimize the disk space usage a bit. If I have package A which depends on packages B and C, both of which need D, then (if the versions match), D will be installed only once.