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?
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.
The suggestion to delete node_modules
and then run npm install
is a good one. It will work. Slightly more efficient, though, might be to just run npm rebuild
without deleting node_modules
or running npm install
. It will re-compile native modules for the new version of Node/V8 you have installed without having to download all the files again.
But if all else fails:
npm cache clean && npm install
npm uninstall -g gulp && npm install -g gulp
I ran into this issue recently, and attempted the steps shown above:
$ npm cache clean && npm install
But was still getting the fault. Even after deleting all files and running
$ npm install
So, did some more rooting, and found that there was an issue whereby some of the node modules had a files ending in .info, which caused Drupal (in which I'm running this framework) to attempt reading the .info files as the theme.info file. Renaming these files (with a different ending) fixed the issue.
Although my problem Drupal-specific, I could imagine similar issues cropping up on other frameworks, as well.
My case the problem was that I had Node v5.9.0 installed. So I downgraded to v4.4.1-LTS and finally got it working again:
Using Homebrew:
$ brew tap homebrew/versions
$ brew install homebrew/versions/node4-lts
And then:
$ npm rebuild
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With