Know the biggest issue I've had with Node (well not me, but my colleagues)? That modules have a habit of using symlinks, which break horridly across Vagrant/VirtualBox shared folders. We ended up fixing it somewhat by using the --no-bin-links option on `npm install` and swapping over to SSHFS, but I really wish module writers would pay more attention to Windows... one of Node's strengths is that it works pretty darne…
Node's nested node_modules approach is basically incompatible with Windows
41–50 of 62 posts
Re: Node's nested node_modules approach is basically incompatible with Windows
#42Earlier quoted context omitted.
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 t…
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 incompatible with Windows
#43Re: Node's nested node_modules approach is basically incompatible with Windows
#44Know the biggest issue I've had with Node (well not me, but my colleagues)? That modules have a habit of using symlinks, which break horridly across Vagrant/VirtualBox shared folders. We ended up fixing it somewhat by using the --no-bin-links option on `npm install` and swapping over to SSHFS, but I really wish module writers would pay more attention to Windows... one of Node's strengths is that it works pretty darne…
Again, this is a Windows issue with its horribly broken symlink handling.
Sorry, but complaining about the base platform behavior doesn't help much if you want to build software on it.
Re: Node's nested node_modules approach is basically incompatible with Windows
#45This definitely seems more like a Windows issue than a Node issue.
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.
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 incompatible with Windows
#46The easiest solution I've found is to just run a VM and not sync whatever folder you install node_modules in. I just had this problem like a week ago with gulp because I was syncing the folder I was building in. It's a good time to learn how to use Vagrant.
Re: Node's nested node_modules approach is basically incompatible with Windows
#47This definitely seems more like a Windows issue than a Node issue.
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 incompatible with Windows
#48The title looks exaggerated. I thought NodeJS cannot just run on Windows anymore. It's not the case though, it does - it's just it creates folders that are nested.
Totally. This is actually a trivially solvable problem (I've been working on a meta package manager compatible with npm, bower and component). The strategy I took with node_modules/, components/ and bower_modules/ was to just follow whatever folder structure it found as far as necessary and look for manifest files (package.json, bower.json and component.json) and register modules at the path of wherever one of those…
Re: Node's nested node_modules approach is basically incompatible with Windows
#49Know the biggest issue I've had with Node (well not me, but my colleagues)? That modules have a habit of using symlinks, which break horridly across Vagrant/VirtualBox shared folders. We ended up fixing it somewhat by using the --no-bin-links option on `npm install` and swapping over to SSHFS, but I really wish module writers would pay more attention to Windows... one of Node's strengths is that it works pretty darne…
IIRC, for OS X, you must create the link from the host. It works because `ln` doesn't check whether the destination of the link exists. So running
ln -s /home/vagrant/node_modules node_modules
in the shared folder from the host will create a link that is functional in the guest.No idea for Linux hosts.
Re: Node's nested node_modules approach is basically incompatible with Windows
#50An hour of swearing was enough to convince me to stop using windows for this entirely.