Npm errors when installing packages on windows share
Solution 1
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.
Solution 2
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.
Solution 3
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.
Solution 4
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.
Related videos on Youtube
Max
Updated on September 18, 2022Comments
-
Max over 1 year
I am developing a game in Haxe with the HaxeFlixel Framework.
I decided to split the map in chunks so i can load new areas of the map at runtime (without loading screen). For that i put every chunk in an instance of
FlxTilemap
.Now I noticed that, when i try to move a
FlxTilemap
(by changing itsx
andy
properties) the collision detection (with FlxG.collide(hero, map)
) does not work right.To test why the collision detection doesn't work, I simply added a
FlxTilemap
to the scene and collided it with my hero:map = new FlxTilemap(); var mapData = ""; for (y in 0...8) { for (x in 0...8) { mapData += "0,"; } mapData += "\n"; } map.loadMap(mapData, AssetPaths.tuxemon_sprites__png, 16, 16); for (x in 0...8) { map.setTile(x, 6, SpriteSheet.TILES.FENCE.LOOSE_1_RIGHT); } for (y in 0...8) { map.setTile(6, y, SpriteSheet.TILES.FENCE.LOOSE_1_RIGHT); } map.setPosition( map.x - map.width / 2, map.y - map.height / 2 ); add(map);
Collision detection is handeled in the
update()
method of the state:override public function update():Void { super.update(); FlxG.collide(hero, map); }
Am I doing it the wrong way or did I simply miss something?
EDIT:
There seems to be a problem in the HaxeFlixel collision detection. The collision will only be detected when the
x
andy
properties of theFlxObject
s are positive. I want to have negativex
/y
positions as well.Does anyone know a fix or workaround for this problem?
-
Clint almost 11 yearsI wish I could upvote you 200 more times. This makes it possible to use Vagrant on windows.
-
long le over 10 yearsnpm install --no-bin-link also works.
-
Jelmer about 10 yearsGreat answer! But is there a way to make this work with the "devDependencies" of a package.json file from Grunt? That would be awesome :)
-
htxryan over 9 yearsThank you! Vagrant should put this in their official documentation for Windows. All my points are belong to you.
-
Gopal Venu over 9 yearsI can't run
grunt
with--no-bin-links
. -
Edu Ruiz almost 9 yearsI found a solution to work with gulp and grunt please, read below.
-
Manjunath Siddappa over 6 yearsThank you, you have saved my day, i was struggling from 1 day