Gulp: Segmentation Fault 11 after Node 4.0 update

Union find picture Union find · Sep 9, 2015 · Viewed 11.6k times · Source

I just updated to Node 4.

When I run Gulp, I see:

Segmentation fault: 11

My includes:

var gulp = require('gulp');

var jscs = require('gulp-jscs');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var responsive = require('gulp-responsive');
var imagemin = require('gulp-imagemin');
var jpegtran = require('imagemin-jpegtran');
var rollup = require('gulp-rollup');
var webp = require('gulp-webp');
var spritesmith = require('gulp.spritesmith');

I am unable to get a debug task to run. Verbose doesn't spit out anything additional.

Thoughts?

Answer

Kevin Xi picture Kevin Xi · Sep 9, 2015

I also update to Node 4.0 and get a segmentation fault on my node server too. I just delete my node_modules directory and rerun npm install, and it is fine.

So I suspect it is because the new version of npm has trouble to load some modules installed by old npm --- but just for some modules, it is OK to directly run npm start after updating on my other servers. I haven't went deep into this.

As a quick fix I think you can try this on your own dependencies.