A
A
Alexey Sosnovsky2015-09-09 14:48:07
Node.js
Alexey Sosnovsky, 2015-09-09 14:48:07

gulp broke after updating nodejs to 4.0, who knows how to fix it?

updated node and galp refused to work
like this galp config

'use strict';
var requireDir = require('require-dir');
requireDir('./gulp/tasks', {recurse: true});

if you do the classic
var gulp = require('gulp');
gulp.task('default', function() {
  // place code for your default task here
});

then the gallp starts, but I have a sprawling task structure using run-sequence for sequential execution. there is a mountain of configs with tasks.
if you try to read the galp config with a webstorm, then it spits out this
Failed to list gulp tasks in fitness/gulpfile.js: process finished with exit code 1 (a non-zero exit code means an error)
 * Edit settings

$ /usr/local/bin/node /usr/local/lib/node_modules/gulp/bin/gulp.js --no-color --gulpfile /Users/ass/projects/fitness/gulpfile.js --tasks
module.js:338
    throw err;
    ^

Error: Cannot find module 'gulp-util'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:286:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/Users/ass/projects/fitness/gulpfile.js:2:13)
    at Module._compile (module.js:434:26)
    at Object.Module._extensions..js (module.js:452:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)

Process finished with exit code 1

if you try to run just a gallp from the console, then like this
$ gulp
Segmentation fault: 11

In general, writing all this wealth in one file is tantamount to subscribing to a kilometer-long sheet. In general, without this thing, the assembly will be quite sad.
Has anyone managed to defeat this phenomenon?
in another project where he has not yet tried to fix the problem, he writes like this
Failed to list gulp tasks in ng-autokeys/gulpfile.js: process finished with exit code 1 (a non-zero exit code means an error)
 * Edit settings

$ /usr/local/bin/node /usr/local/lib/node_modules/gulp/bin/gulp.js --no-color --gulpfile /Users/ass/projects/ng-autokeys/gulpfile.js --tasks
/Users/ass/projects/ng-autokeys/node_modules/gulp-sass/node_modules/node-sass/lib/extensions.js:148
    throw new Error(['`libsass` bindings not found in ', binaryPath, '. Try reinstalling `node-sass`?'].join(''));
    ^

Error: `libsass` bindings not found in /Users/ass/projects/ng-autokeys/node_modules/gulp-sass/node_modules/node-sass/vendor/darwin-x64-46/binding.node. Try reinstalling `node-sass`?
    at Object.sass.getBinaryPath (/Users/ass/projects/ng-autokeys/node_modules/gulp-sass/node_modules/node-sass/lib/extensions.js:148:11)
    at Object.<anonymous> (/Users/ass/projects/ng-autokeys/node_modules/gulp-sass/node_modules/node-sass/lib/index.js:16:36)
    at Module._compile (module.js:434:26)
    at Object.Module._extensions..js (module.js:452:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/Users/ass/projects/ng-autokeys/node_modules/gulp-sass/index.js:163:21)
    at Module._compile (module.js:434:26)

Process finished with exit code 1

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Petrov, 2015-09-09
@sosnovskyas

What error does it give?

S
scapp, 2015-09-19
@scapp

Remove node_modules then reinstall npm i everything will work

R
Raman, 2016-03-22
@ramanzh

Maybe someone will come in handy.
When running gulp in the console, it throws a Segmentation fault: 11
This can happen, besides updating node and other reasons, also due to the gulp-sass module.
Solution:
1. Delete the last changes you made in the sass file, it also happens that you need to do in the console cd / and cd ~/[path to the project folder]
2. Run gulp again.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question