4 ms·
It's interesting to hear him say that npm and node_modules are regrets since lots of complaints about Go packaging from people new to Go ask for something simil
by azylman 8y ago
It's interesting to hear him say that npm and node_modules are regrets since lots of complaints about Go packaging from people new to Go ask for something similar...
- k__ 8y agoI think the package system consists of many parts. Some parts of npm are much better than with most package systems, some really suck. Maybe if npm weren't included so deeply into Node, it would make something like Yarn emerge sooner and replace npm without much hassle.
- jessaustin 8y agoyarn just seems like a set of incremental improvements over npm? Which is great, we're all for improvements. However, the vehement complaints I've seen about npm [0] make it seem that nothing short of a complete re-architecture could be tolerated. yarn does not seem to be that. I don't agree with those complaints, but I do agree with you that "some parts" are really good. node really figured out the right search strategy for an unscoped import. (e.g. "require 'foo';" rather than "require './bar/foo';") Just look for a directory with the name "node_modules". If you don't find it, go up one directory and try again. So simple! So predictable! So complete! It works so well, all manner of "left-pad" abominations can be supported. Any other system should think very carefully before using a different import search strategy. [0] with the exception of those related to path depth: I think those are resolved now? I wouldn't know because I stay on an OS that doesn't go out of its way to frustrate me.
- k__ 8y agoWell, since npm was the de facto default, it had enough time to catch up, I guess.
- geocar 8y agoYeah I was surprised about node_modules as well. I think that's actually a killer feature (that we don't need $NODE_PATH or virtualenv or similar)!
- jonny_eh 8y agoI've found it has certainly helped with debugging. I find it nice that all of my project's code is in one directory. To save on disk space, use pnpm, best of both worlds! https://github.com/pnpm/pnpm https://github.com/pnpm/pnpm