Skip to content
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

Getting Gaze._watchDir error in gulp watch #202

Closed
ashish91 opened this issue Oct 29, 2015 · 3 comments
Closed

Getting Gaze._watchDir error in gulp watch #202

ashish91 opened this issue Oct 29, 2015 · 3 comments

Comments

@ashish91
Copy link

[14:25:05] Error: watch ENOSPC
    at errnoException (fs.js:1031:11)
    at FSWatcher.start (fs.js:1063:11)
    at Object.fs.watch (fs.js:1088:11)
    at Gaze._watchDir (/home/ashish/codebase/coef/coef-web-app/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:289:30)
    at /home/ashish/codebase/coef/coef-web-app/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:358:10
    at iterate (/home/ashish/codebase/coef/coef-web-app/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/helper.js:52:5)
    at Object.forEachSeries (/home/ashish/codebase/coef/coef-web-app/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/helper.js:66:3)
    at Gaze._initWatched (/home/ashish/codebase/coef/coef-web-app/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:354:10)
    at Gaze.add (/home/ashish/codebase/coef/coef-web-app/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:177:8)
    at new Gaze (/home/ashish/codebase/coef/coef-web-app/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:74:10)
Error running task sequence: { [Error: watch ENOSPC] code: 'ENOSPC', errno: 'ENOSPC', syscall: 'watch' }

Following is my gulp task:

var gulp        = require('gulp');
var config      = require('../config');
var runSequence = require('run-sequence');

gulp.task('watch', function(){
    runSequence( 'js', 'sass', 'browserSync');
    gulp.watch([config.sass.src, 'node_modules/bootstrap-sass/assets/stylesheets/**/*'], ['sass']);
    gulp.watch([config.js.src], ['js']);
    gulp.watch([config.html.src], ['html']);
    gulp.watch([config.locales.src], ['locales'])
});

My colleague is not getting this error who's on 0.5.1 version. I checked that glob-watcher package was using 0.5.2 version in my case.

glob-watcher@0.0.6
└─┬ gaze@0.5.2
  └─┬ globule@0.1.0
    ├─┬ glob@3.1.21
    │ ├── graceful-fs@1.2.3
    │ └── inherits@1.0.2
    ├── lodash@1.0.2
    └─┬ minimatch@0.2.14
      ├── lru-cache@2.7.0
      └── sigmund@1.0.1

I searched through SO and all says to upgrade to 0.5.x version but I am seeing the issue still in 0.5.1

@ashish91 ashish91 changed the title Getting Gaze._watchDir in gulp watch Getting Gaze._watchDir error in gulp watch Oct 29, 2015
@shama
Copy link
Owner

shama commented Oct 29, 2015

It sounds like you'll need to increase your max_user_watches: http://stackoverflow.com/questions/16748737/grunt-watch-error-waiting-fatal-error-watch-enospc

Or check to make sure you don't have a pattern running loose and watching a ton of unintended files.

@ashish91
Copy link
Author

ashish91 commented Nov 1, 2015

Thanks @shama, solved the problem. kudos 👍

@alimakarfi
Copy link

Thanks @shama, solved the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants