5 ms·
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/Vir
by girvo 12y ago
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 darned well on Windows (just like how XAMPP made PHP deal with windows well enough for a large developer base to grow)
- deleted 12y ago[deleted]
- yid 12y agoThere's no reason why node/npm can't implement a thin filesystem mapping layer on Windows and map long, logical module paths to shorter filesystem paths. That sort of address translation would fix both the symlink and the path length issues.
- rmrfrmrf 12y agoAgain, this is a Windows issue with its horribly broken symlink handling.
- Argorak 12y agoSo, let's go fix it. Sorry, but complaining about the base platform behavior doesn't help much if you want to build software on it.
- pygy_ 12y agoIf you're using OS X or Linux, you can create a `node_modules` symlink in the shared folder to a local guest directory. 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.