Why am I getting a "JavaScript heap out of memory" on gulp watch?
<p>I have a pretty simple and straightforward gulpfile for sass compilation, concat, minification and browser reload on changes using a watch task that observes for *.php, *.js and *.sass.</p>

<pre><code>require('es6-promise').polyfill();
var gulp = require('gulp'),
  sass = require('gulp-sass');
var concat = require('gulp-concat'),
  uglify = require('gulp-uglify'),
  rename = require('gulp-rename'),
  livereload = require('gulp-livereload');

var config = {
  scripts: [
    './bower_components/jquery/dist/jquery.min.js',
    './bower_components/materialize/dist/js/materialize.js',
    './js/**/*.js'
  ]
};

gulp.task('sass', function() {
  return gulp.src('./sass/style.scss')
    .pipe(sass.sync({
      includePaths: ['./bower_components/materialize/sass'],
      outputStyle: 'compressed'
    }).on('error', sass.logError))
    .pipe(livereload())
    .pipe(gulp.dest('./'));
});

gulp.task('scripts', function() {
  return gulp.src(config.scripts)
    .pipe(concat('scripts.js'))
    .pipe(gulp.dest('./js/'))
    .pipe(uglify())
    .pipe(rename({
      extname: '.min.js'
    }))
    .pipe(livereload())
    .pipe(gulp.dest('./js/'));
});

gulp.task('copyassets', function(){

})

// default task
gulp.task('default', ['sass', 'scripts']);

gulp.task('watch', function () {
  livereload.listen(35729);
  gulp.watch('**/*.php').on('change', function(file) {
        livereload.changed(file.path);
    });
  gulp.watch('./sass/**/*.scss', ['sass']);
  gulp.watch('./js/**/*.js', ['scripts']);
});
</code></pre>

<p>I execute the default task with <code>gulp</code>, and it was working fine for me until a few hours ago. All of a sudden, I have started getting <code>FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory</code> on SASS changes. </p>

<p>I have tried allocating it more space with '--max-old-space-size=8192', but to no use. </p>

<p>I have reverted all recent changes too in my code base, but that did not seem to fix it too.</p>

<p>Any help or pointers will be appreciated.</p>

<p>I am using this in combination with a _s WP theme.</p>