News for hackers. Stuff that matters.
Re:Node's nested node_modules approach is basically incompat... by dbbolton on Thursday June 19, 2014 @01:58AM (#7914672)
This definitely seems more like a Windows issue than a Node issue.
Re:Node's nested node_modules approach is basically incompat... by nopar8 on Thursday June 19, 2014 @02:12AM (#7914705)
At first I agreed with you; but then I read one of the comments on github that swayed me.

"You are the one playing games - calling core parts of Windows like Explorer "3rd party tools", and suggesting that not supporting long paths is a bug. Microsoft have made it clear repeatedly that non-support for long paths is not a bug, and not something that will change.

A package manager creating paths that do not work with the majority of the software written for an OS, then claiming compatibility with the OS, is playing games, at your users expense."

At the end of the day Windows wont be the thing changing. haha.

Re:Node's nested node_modules approach is basically incompat... by nevi-me on Thursday June 19, 2014 @02:17AM (#7914717)
I don't follow, should we then rename everything to cryptic, short characters like some people do in MongoDB (as someone suggested using n_m instead of node_modules)? If it works well in other platforms, it's an issue with that specific platform
Re:Node's nested node_modules approach is basically incompat... by rando289 on Thursday June 19, 2014 @03:09AM (#7914809)
windows has path length limits. Figure out how to live in them, whatever way is best. If that means using cryptic names, then do it. cryptic folder names, while not a good thing, are extremely common in windows.
Re:Node's nested node_modules approach is basically incompat... by tlrobinson on Thursday June 19, 2014 @03:23AM (#7914844)
Or, don't support Windows.
Re:Node's nested node_modules approach is basically incompat... by rando289 on Friday June 20, 2014 @12:58AM (#7919577)
Yes, fine by me.
Re:Node's nested node_modules approach is basically incompat... by nopar8 on Thursday June 19, 2014 @02:28AM (#7914736)
I think we're arguing different things. I'm more talking semantics.
Re:Node's nested node_modules approach is basically incompat... by dbbolton on Thursday June 19, 2014 @12:35PM (#7916962)
Right, in practical terms it's up to Node to fix this (or go extreme and drop Windows support), but in a more abstract sense I still blame Microsoft for such a glaring design flaw in their software that they are unwilling/unable to fix.
Re:Node's nested node_modules approach is basically incompat... by tlrobinson on Thursday June 19, 2014 @03:23AM (#7914843)
Microsoft can decide to not call it a bug but that doesn't mean the rest of us don't believe it's a bug.
Re:Node's nested node_modules approach is basically incompat... by CmonDev on Thursday June 19, 2014 @04:04AM (#7914970)
In that case Node.js has a huge bug - only natively supporting one messy legacy language (without crap-transpilation).
Re:Node's nested node_modules approach is basically incompat... by xpaulbettsx on Thursday June 19, 2014 @02:57AM (#7914788)
Is creating dozens of nested folders inside each other really a sane thing to do? Run `find .` on any reasonably complicated node project and look at the crazy paths that show up.

npm's strategy of nesting like that made things simpler when it was more of a new project, but it's time to come up with something more robust.

Re:Node's nested node_modules approach is basically incompat... by Cthulhu_ on Thursday June 19, 2014 @04:26AM (#7915142)
This; each subproject having its own nested string of (often the same) dependencies just seems wasteful of me.

I like Maven's approach better; a centralized repository directory. In Node / NPM's case, given that each library has a simple name, I can imagine a directory structure ~/.node_modules/package/1.0.0. Severely reduces filesystem depth, and probably fixes re-downloads of the same package / versions too. Only requirements are a rewrite or update of node's require method, NPM's package install directory and maybe some more strictness about NPM releases.

Re:Node's nested node_modules approach is basically incompat... by jonpacker on Thursday June 19, 2014 @04:54AM (#7915250)
I disagree. I think node's approach is easily understandable, and quite robust. It's incredibly easy to dive down the dependency chain and see every package, and know exactly which one is being used where. Not something that can be said about package managers that use the flattened approach.
Re:Node's nested node_modules approach is basically incompat... by xpaulbettsx on Thursday June 19, 2014 @03:12PM (#7917779)
Pretty Printing the full dependency tree is a feature that could be easily added to npm itself, and in a way easier way to understand than trying to read through a directory tree