-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
npm errno -5 with NFS #96
Comments
It looks to be permissions related, but as |
Can you share the package.json (or if it already fails with one package, the name of the package) so i can try to reproduce this? |
@marcharding npm_nfs_errno_minus_5.zip Attached is the I suspect its permissions related on the FS side, but as I don't get this behaviour with the standard shared folder setup, I'm not sure what route to explore, considering my VM is already elevated with "Run as administrator" |
Ok i think i know whats wrong, will take a few days to get fixed (probably sometime next week). |
@marcharding Cool. Appreciate you looking at the issue. Look forward to further info and a possible fix in the coming weeks. Thanks. |
I though that the problem was npm deleting non empty directories (.staging), so i added a recursive delete function. The rename/delete errors are gone but your sample package.json still fails with errors like these
I'm not sure whats going on, npm does so much stuff its hard to figure out whats fails. I can manually unpack the archives to the mounted folder just fine. Small Googling for the You can try yourself: WinNFSd.zip (this file is not production ready, just use it to do some tests) |
Ok, i do not think its an npm bug, i will try to figure out what is wrong... |
@marcharding Thanks for looking into this. I never saw those Replacing the
On the finalize stage before I'd get lots of repeated errors, this time I only got one. I think specific packages seems to cause the |
Is |
Actual mount within the VM is at |
@marcharding Just wondering if you got any further on progress with the |
Not yet. It would help if you can provide a much smaller package.json that fails. |
OK. Let me do some tests and see if there are specific deps that fail and create a smaller |
The following packages seem to have problems:
|
Just wanted to give you an update that this issue will probably take some more time... |
No problem. Thanks for letting me know. |
This happened to me yesterday and before that it was working fine. I could not figure it out why. I'm running windows 10, maybe there was a windows update that caused winnfsd to stop working properly? The problem seems to be only on npm uninstall; npm install works fine. Sometimes there are also problems with files that need to be edited or rewritten(like with gulp running browserify(babelify) for example) |
@strangedream1900 Not the case for me, its been happening on Windows 10 1511 and 1607 (Anniversary update), I don't think a Windows Update is the problem here. It is however only certain npm packages that trigger it, others will install fine. |
@ jamesmacwhite I successfully installed lodash, grunt, babel-core, babel-runtime, yaml-loader. No problems there, but when I want to uninstall any package I get that npm ERR! errno -5... I'm running vagrant with admin privileges. I still think there was something windows did because before yesterday I had absolutely no problems(I updated to AU a week ago). Now I have 3 virtual machines with the same problem. If I have the time, I'm gonna try the same setup on windows 7. |
I'm running as admin as well for symlinks to work, otherwise npm fails horribly on the standard VBoxSF setup. I've never personally tried to uninstall with npm, I just nuke node_modules and let the package.json run through during testing. I have no idea regarding Windows Update, personally I've had the problem for sometime and didn't think it was related to any Windows updates. I guess if you can provide another usage case where the errno -5 occurs it might help debug further. |
So I just tested on an old windows 10 build and I get the same error. I also tested on an older version of my vagrant box, and also tried previous versions of vagrant-winnfsd..still the same. I ran out of ideas what it could be. |
Any news on this issue? |
Not yet, i hope that i can get to this again in october. |
I have a permanent way to reproduce this issue, it's not in npm but while running a grunt job. Each time I want to delete some files with a grunt-contrib-clean job, I get the following error: Running "clean:beforebuild" (clean) task Deleting the files in directory target manually just works fine. I'm running Grunt on node v6.7.0. I'm running:
Edit: |
can you provide me with the most simple grunt setup where this happens? As for 2.3.0: This only had some fixes regarding the mount path, nothing really fancy... |
Here is my setup:
Inside the Linux guest, installed node.js v6.7.0 (Also installed the same node version in the Windows host, not really necessary, but I need it to be able to build anything because of this bug). Most minimal grunt setup inside nfs-bug: package.json: {
"devDependencies": {
"grunt": "1.0.1",
"grunt-contrib-clean": "1.0.0"
}
} Gruntfile.js: module.exports = function (grunt) {
grunt.initConfig({
clean: {
target: ["target/"],
}
});
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.registerTask('default', ['clean:target']);
}; Now, at this point you need to cd into this directory, and run: On my Linux guest, this sometimes fails horribly with the following examples:
Or:
I've mostly seen it happen while doing a rmdir call, but sometimes also while doing a symlink call. Either way, if you repeat the Now for the issue I can permanently reproduce: Create a directory target, and a file foo in there: mkdir target
touch target/foo And run the grunt clean task: grunt This always gives me:
Deleting the file and directory under target with a simple rm command always works. Moving the whole nfs-bug directory under a non-nfs mounted space also works. So it seems to me there is something going on with the rmdir, and as it seems also, but less frequently, symlink calls that node.js is doing is combination with nfs mounted directories exported on Windows. |
Please try the attached binary, i think that solves this (grunt task is working, npm install throws some errors but finishes). Thanks for the thorough report! |
In almost all of these examples, I am noticing that it mostly involves the deletion of dotfiles (or directories) on the windows host. Is that the root of the issue here? The symlink I'm not sure about, as I'm aware there are general issues with that when attempting to create from a Linux VM on a Windows host (regardless of vagrant share type), but I don't know. |
Did you try it again with the new binary linked above? You can just replace the current one in The deletion errors should be fixed with it, had nothing to do with dotfiles (i suspected that too) but with an implementation error for the remove nfs call. |
@marcharding Thanks for looking into this once again. Would the attached binary resolve my originally reported issues with npm? |
@jamesmacwhite i'm not sure, would you mind trying again on your setup? using the new binary above fyi: |
@marcharding in my case, the new binary works well. All errors and warnings are gone. Thanks. |
@marcharding I have tested the new binary and it now works flawlessly, both with the "simple" version of Grunt I sent you, and also with the full suite we're running here. Thanks! |
@cedricroijakkers great 👍 thanks again for the thorough steps to reproduce this. @jamesmacwhite, @patricknelson can you also test the new binary? if everything works out, i'll release a updated plugin. |
@marcharding Thanks for your work on this. I've just got round to testing the new binary. I've upgraded VirtualBox (5.1.6) and Vagrant (1.8.6) respectively as I was several versions behind and removed my
I did get a couple of "Operation not permitted" errors during the build which I haven't seen before on a previous version of the binary. It happened on specific npm packages
|
@jamesmacwhite Great 🎉 The permission stuff is not supported on nfs mounts (this is the case for not only winnfsd but native nfs mounts as well) See nodejs/node-gyp#562 for more details. There seem to be two possible solutions: 1: Using https://github.com/gael-ian/vagrant-bindfs with
(i'm not sure how that would solve this, but nevertheless its worth a try). 2: Change the "offending" command during the make process. |
@marcharding Hi -- I originally wasn't going to chime in since I believe my issue was unrelated. I ended up having the same bug again in the If the file path is too long (if that's the cause if your issue):
Example command:
So that then even if you end up with |
@marcharding Many thanks for clarifying, I'll look at implementing a workaround for that specific component. Looks like the originally reported issue is fixed now though, many thanks for your work on fixing this issue. |
@patricknelson thanks, i'll add this to the wiki. Fixed with winnfsd 2.3.1, vagrant plugin will be updated soon. |
@marcharding Any news about the update of the vagrant plugin ? :) |
@tmbdrogba I has been updated. The 1.3.1 release fixes this issue. Just run:
|
@jamesmacwhite Thx for the answer. Things is, I have this version as well and still get the same error as you :s |
Try to provide a minimal package.json and i'll try to reproduce it. |
Windows 10 pro, 1709, 16291.0 Command: Output:
|
@luckynum7, this worked for me:
Another solution if you don't want a shell with admin rights:
Or you could allow non-admins to create symlinks, see https://superuser.com/questions/104845/permission-to-make-symbolic-links-in-windows-7 (not tested). Also see #66 |
@luckynum7 If you need to find where winnfsd is installed, open powershell and just type: Get-Process winnfsd* | select Path You can either pipe Get-Process winnfsd* | select Id | Stop-Process |
Hi @ivesdebruycker and @leandrw, thanks for the tip 👍 |
This is still an issue. Can we reopen this? I have the problem with webpack building. |
If anyone else is having trouble with just npm install, --no-bin-links might help. I was able to successfully run npm install --no-bin-links |
The tip from @ivesdebruycker to allow non-admins to create symlinks worked for me:
You will need administrator privileges to run |
I'm getting various errors from
npm
during a standardnpm -i
relating to rename and rmdir syscalls.My setup is a Windows 10 host running a Ubuntu Linux Vagrant VM with vagrant-winnfsd plugin
1.2.0
installed.vagrant up
is run as administrator sonpm
doesn't explode when installing packages that use symlinks (--no-bin-links
is evil). This resolved the issue when running the standard vboxsf setup.Since switching to NFS with this plugin I was having problems with various
npm
related commands, so I decided to removenode_modules
directory and rebuild. Extract process goes OK, so data withinnode_modules
is being read and written OK but oncenpm
gets to the install stage, I then get failures like this:In addition lots of warnings like the examples below:
Various errors on renaming and removing directories. They don't look symlink related though, so it hints at a different error, something I've not seen before when mounting
/home/vagrant/code
without using NFS.These are the
mount_options
I'm using inHomestead.yaml
mount_options: ['nolock', 'vers=3', 'udp', 'fsc', 'actimeo=1', 'intr']
Any ideas?
The text was updated successfully, but these errors were encountered: