Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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)


There'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.


If 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.


Again, this is a Windows issue with its horribly broken symlink handling.


So, 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.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: