title: Gulp.js stops compiling LESS when watched after there has been an error in the LESS files
body: <p>I'm having a problem with <code>gulp</code>. I run <code>gulp-watch</code> along with <code>gulp-less</code> and <code>gulp-clean</code>. Everything is running perfectly.</p>
  
  <p>When I edit <code>somefile.less</code> and I save it with a semi-colon missing or maybe I accidentally leave a trailing <code>;s</code>, just have errors in my code when saving, <code>gulp-less</code> logs an error in the console. After I fix it <code>gulp-watch</code> continues watching the files, but <code>gulp-less</code> doesn't fire and it doesn't compile. When I stop <code>gulp</code> and run it again in the terminal everything goes back to normal.</p>
  
  <p>Here is my <code>gulpfile.js</code>:</p>
  
  <pre><code>var gulp = require('gulp');
  var clean = require('gulp-clean');
  var gutil = require('gulp-util');
  var less = require('gulp-less');
  var watch = require('gulp-watch');
  var path = require('path');
  
  gulp.task('clean', function() {
      return gulp.src('src/main/webapp/styles/build', {read: false})
     .pipe(clean().on('error', gutil.log))
  });
  
  gulp.task('less', function() {
      return gulp.src(['src/main/webapp/styles/main.less'], {base: 'src/main/webapp/styles/'})
      .pipe(less().on('error', gutil.log))
      .pipe(gulp.dest('src/main/webapp/styles/build'))
      .on('error', gutil.log);
  });
  
  gulp.task('watch', function() {
      watch('src/main/webapp/styles/**/*.{less, css}', function() {
          gulp.start('less')
          .on('error', gutil.log);
      })
  });
  
  gulp.task('default', ['clean'], function() {
      gulp.start(['less', 'watch'])
      .on('error', gutil.log);
  });
  </code></pre>
  
  <p>And here are my <code>devDependencies</code>:</p>
  
  <pre><code>"devDependencies": {
      "gulp": "^3.8.10",
      "gulp-clean": "^0.3.1",
      "gulp-less": "^2.0.1",
      "gulp-util": "^3.0.2",
      "gulp-watch": "^3.0.0"
  }
  </code></pre>
  
  <p>Finally, here is the message in the console:</p>
  
  <pre><code>[10:21:03] imports/productSearchPage.less was changed
  [10:21:03] Starting 'less'...
  [10:21:03] { [Error: Unrecognised input. Possibly missing something in file /src/main/webapp/styles/imports/productSearchPage.less line no. 1008]
    type: 'Parse',
    filename: '/src/main/webapp/styles/imports/productSearchPage.less',
    index: 19127,
    line: 1008,
    callLine: NaN,
    callExtract: undefined,
    column: 0,
    extract: [ '', '', undefined ],
    message: 'Unrecognised input. Possibly missing something in file /src/main/webapp/styles/imports/productSearchPage.less line no. 1008',
    stack: undefined,
    lineNumber: 1008,
    fileName: '/src/main/webapp/styles/imports/productSearchPage.less',
    name: 'Error',
    showStack: false,
    showProperties: true,
    plugin: 'gulp-less',
    __safety: { toString: [Function] } }
  [10:21:04] imports/productSearchPage.less was changed
  [10:21:08] imports/productSearchPage.less was changed
  ^C
  </code></pre>
  
  <p>Can you please tell me what is wrong with the <code>gulp-watch</code> task and help me make it run <code>gulp-less</code> after the errors have been removed, without restarting <code>gulp</code>.</p>
  
  <p>EDIT:
  My edited <code>gulp-less</code> task</p>
  
  <pre><code>gulp.task('less', function() {
      return gulp.src(['src/main/webapp/styles/main.less'], {base: 'src/main/webapp/styles/'})
      .pipe(less().on('error', gutil.log))
      .pipe(gulp.dest('src/main/webapp/styles/build'))
      .on('error', function(err) {
          gutil.log(err);
          this.emit('end');
      });
  });
  </code></pre>