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
For anyone still having this problem after trying npm install --no-bin-links
.
I wasn't able to get any of the above solutions to work when I came across a similar issue running npm install
on a Laravel Homestead Vagrant box on a Windows 7 host using VirtualBox. The guest box has a mapped directory to the Windows file system.
The problem was causing various error messages and failed package installations. The one that is most relevant to the question was npm ERR! UNKNOWN, symlink '<some filename>'
.
To fix this, I was able to successfully run npm install
on the Git bash command line on Windows rather than bash on the guest Linux.
To do this, you will need to install Git for Windows and NodeJS (both on your Windows box).
e.g.
choco install nodejs.install
choco install git.install
C:\Program Files (x86)\Git\Git Bash.vbs
cd /c/projects/projectname
npm install
Everything appears to install successfully.