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

gulp watch error (ENOSPC) #217

Closed
escapedcat opened this issue Jan 29, 2014 · 15 comments
Closed

gulp watch error (ENOSPC) #217

escapedcat opened this issue Jan 29, 2014 · 15 comments

Comments

@escapedcat
Copy link

Since today my watch task is broken.
That's what I get:

gulp watch
[gulp] Using file /var/www/project/gulpfile.js
[gulp] Working directory changed to /var/www/project
[gulp] Running 'watch'...
[gulp] Errored 'watch' in 10 ms watch ENOSPC

/var/www/project/node_modules/gulp/node_modules/orchestrator/index.js:153
            throw err;
                  ^
Error: watch ENOSPC
    at errnoException (fs.js:1019:11)
    at FSWatcher.start (fs.js:1051:11)
    at Object.fs.watch (fs.js:1076:11)
    at Gaze._watchDir (/var/www/project/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:279:30)
    at /var/www/project/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:336:10
    at iterate (/var/www/project/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/helper.js:52:5)
    at Object.forEachSeries (/var/www/project/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/helper.js:66:3)
    at Gaze._initWatched (/var/www/project/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:332:10)
    at Gaze.add (/var/www/project/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:167:8)
    at new Gaze (/var/www/project/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:68:10)

My gulpfile.js:

var gulp        = require('gulp');

// Watch
gulp.task('watch', function() {
    // Watch .scss files
    gulp.watch('app/sass/**/*.scss', function(event) {
        //console.log('File ' + event.path + ' was ' + event.type + ', running tasks...');
    });
});

My package.js:

{
  "name": "project",
  "version": "0.0.1",
  "dependencies": {
  },
  "devDependencies": {
    "gulp": "*",
    "gulp-ruby-sass": "*",
    "gulp-minify-css": "*",
    "gulp-jshint": "*",
    "gulp-concat": "*",
    "gulp-uglify": "*",
    "gulp-imagemin": "*",
    "gulp-clean": "*",
    "gulp-cache": "*",
    "gulp-notify": "*",
    "gulp-web-modules": "*",
    "gulp-serve": "*",
    "gulp-plumber": "*",
    "jshint-stylish": "*"
  }
}

Not sure if I somehow broke something... but it was working before :P

@phated
Copy link
Member

phated commented Jan 29, 2014

It looks like is related to the number of files you are watching. See http://stackoverflow.com/questions/16748737/grunt-watch-error-waiting-fatal-error-watch-enospc

@yocontra
Copy link
Member

gaze problem open there

@escapedcat
Copy link
Author

And working again, without changing something... I was only watching 5 (rather small) files.
Maybe I was just low on memory in general at the point. Weird.
But thx for pointing out the stackoverflow link. I didn't see that one.

@cancerberoSgx
Copy link

in linux you fix this with the command:
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

@saimusdev
Copy link

That actually works 😄

@airtonix
Copy link

@cancerberoSgx cheers.

context:

  • only watching one coffeescript file.

@mzahor
Copy link

mzahor commented Mar 7, 2015

@cancerberoSgx thanks, it works.

@ghost
Copy link

ghost commented Mar 12, 2015

Thanks @cancerberoSgx . it's work.

@Asher-Tan
Copy link

thanks ! @cancerberoSgx

@sofialunkes
Copy link

@cancerberoSgx Thanks man! it works!

@selahattinunlu
Copy link

@cancerberoSgx Thanks!

@racerboy
Copy link

racerboy commented Jul 1, 2015

@cancerberoSgx Great! How did you know that? Thanks!

@rlucha
Copy link

rlucha commented Jul 5, 2015

@cancerberoSgx thank you :)

@ibrahimabdelkhaleq
Copy link

@cancerberoSgx Thanks man! it works!

@callumacrae
Copy link
Member

@contra / @phated / @sindresorhus please could you lock this? Too much noise :(

@gulpjs gulpjs locked and limited conversation to collaborators Jul 13, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests