Nodejs + npm, installing modules on ntfs partition

Sosnowski picture Sosnowski · Nov 22, 2011 · Viewed 11.1k times · Source

I have a problem when installing npm modules. NodeJS is installed on Ubuntu 11.10 running on Virtual Box on Windows host. My project files are on NTFS partition (I have to share them with windows). When I try to install some npm module I get an error, and module is not installed. I've found out that problem occurs when npm tries to create symbolic links.

Probably you can not create symlinks on NTFS partition, when I'm installing module "inside" Linux file system, everything works fine.

How can I fix this? I don't want to resolve dependencies manually :/

Answer

blackjid picture blackjid · Mar 1, 2013

Since version 1.2.21, npm has a new option for the install command. --no-bin-links

You can use if for installing a specific node module

npm install express --no-bin-links

and also for a package.json install

npm install --no-bin-links

With this option I've been able to install many npm modules without problems in my shared forlder inside the VM (Ubuntu guest, Windows Host)

The commit where the option was added to the npm code is b4c58617039c21c10889a9869f8e86a23e17d3a0