shama / gaze

:crystal_ball: A globbing fs.watch wrapper built from the best parts of other fine watch libs.
MIT License
1.16k stars 167 forks source link

EPERM error code in 'bash for windows' #228

Closed carmona closed 8 years ago

carmona commented 8 years ago

I've been using the Linux subsystem for Windows 10, mostly for tests and some development. There's this project I use which has gulp with a few watch tasks, which did not work and the stack trace ended up on this package (which I admittedly had no idea was used by a dependency of a dependency [...] of gulp)

Can somebody give me some insight on why i'm getting this permission error? Is it due to the use of shared folders inside the linux subsystem? The distro is Ubuntu 14.04 and node version is 4.3.2.

[03:33:07] Error in plugin 'run-sequence(watch)' Message: watch /mnt/c/Workspaces/ng-md-boilerplate/dev/ EPERM Details: code: EPERM errno: EPERM syscall: watch /mnt/c/Workspaces/ng-md-boilerplate/dev/ filename: /mnt/c/Workspaces/ng-md-boilerplate/dev/ Stack: Error: watch /mnt/c/Workspaces/ng-md-boilerplate/dev/ EPERM at exports._errnoException (util.js:870:11) at FSWatcher.start (fs.js:1234:19) at Object.fs.watch (fs.js:1262:11) at Gaze._watchDir (/mnt/c/Workspaces/ng-md-boilerplate/builder/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:289:30) at /mnt/c/Workspaces/ng-md-boilerplate/builder/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:358:10 at iterate (/mnt/c/Workspaces/ng-md-boilerplate/builder/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/helper.js:52:5) at Object.forEachSeries (/mnt/c/Workspaces/ng-md-boilerplate/builder/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/helper.js:66:3) at Gaze._initWatched (/mnt/c/Workspaces/ng-md-boilerplate/builder/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:354:10) at Gaze.add (/mnt/c/Workspaces/ng-md-boilerplate/builder/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:177:8) at new Gaze (/mnt/c/Workspaces/ng-md-boilerplate/builder/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:74:10)

hhgyu commented 8 years ago

this is a bug with the Bash implementation in Win 10. https://github.com/nodejs/node/issues/7496

carmona commented 8 years ago

thanks @hhgyu