Npm errors when installing packages on windows share
Running with --no-bin-links
fixed it for me:
npm install --no-bin-links
--no-bin-links
tells npm
to not create any symbolic links. There isn't a way (to my knowledge) of translating symlinks to a Windows share.
How to allow creating symlinks on windows this page helped me a lot which explains that this happens even if your shared folder is writable.
To fix it, you need to enable symlinks feature in VirtualBox.
Run at cmd prompt:
VBoxManage setextradata YOURVMNAME VBoxInternal2/SharedFoldersEnableSymlinksCreate/YOURSHAREFOLDERNAME 1
Then verify by:
VBoxManage getextradata YOURVMNAME enumerate
If your user belongs to Administrators group then start VirtualBox with "Run as Administrator"!
By default Windows 7 security policy does not allow creating symlinks as it's a potential security threat. Run "secpol.msc" and navigate to "Local Policies-User Rights Assignments" and add your user to "Create symbolic links". I didn't try that but could be that after that virtualbox could be run as a regular user.
Agree with lorem, but it's not enough.
run Virtualbox 'as an admininstrator' on Windows.
make sure you executed:
VBoxManage.exe setextradata YOUR_VM BoxInternal2/SharedFoldersEnableSymlinksCreate/YOUR_SHARED_FOLDER 1
Replace the YOUR_VM and YOUR_SHARED_FOLDER with your values.
You can check the value via: VBoxManage.exe getextradata boot2docker-vm enumerate
There is a virtualbox bug tracking this issue.
The newer versions of VirtualBox should allow symlinks if you start VirtualBox as Adminstrator (right click: Run as administrator).
Same applies to vagrant boxes: just run your cmd.exe/PowerShell as admin and you are good to go.