3 ms·
How is npm a model for anything? Just do a find . -type d -name node_modules | wc -l from any reasonably large project's root directory -- the results will
by jessedhillon 11y ago
How is npm a model for anything? Just do a
find . -type d -name node_modules | wc -l
from any reasonably large project's root directory -- the results will defy your sense of parsimony.
Packages which require other modules pegged to a specific version will install that package within their own node_modules directory, when they are already deep within a subdirectory of another node_modules directory. If two packages both require bar@X.Y.Z, they will both install that bar package in their own node_modules directory.
It is literally the most naive way to write a package manager.
What exactly is the overhead of a virtualenv? A few symlinks and a script which adds a few variables to your environment? Your calculation of what is and isn't complex is exactly backwards from the traditional Python perspective.
As a Pythonista, I can't help but object to the homebrew/npm school of roll-your-own package management. It eschews parsimony, deliberate architecture planning, and learning from the mistakes of other projects in favor of aesthetics and (sorry, I can't think of another name for this) hipster-DIYism.
- ehremo 11y agoYes I have sometimes wondered about that. In fact another aspect of npm which I don't get is if you have multiple "instances" of a library (e.g. different versions, or even two copies of the same version) then any library global variables will not be shared across those instances. But I don't know enough about JS development to say whether this really happens and/or if it is an issue (some pretty cool stuff has been done with JS so I guess it's possible to live with it). BTW I share your dislike of hipsters, though I am a bit jealous those moustaches are just so cool.