mikaelbr/gulp-notify

Ubuntu 14.04 LTS unhandled 'error' event

Closed this issue · 2 comments

Hi, I started to use gulp-notify it is really useful, but when I run gulp it sometimes work, but most of the time I get in my console an error, I really don't know why.

This is my gulpfile.js

var gulp = require('gulp');

// Tests
var phpspec = require('gulp-phpspec');
var run = require('gulp-run');
var notify = require('gulp-notify');

/*
|--------------------------------------------------------------------------
| Test Tasks
|--------------------------------------------------------------------------
| This tasks trigger tests of PhpSpec on Save
*/
gulp.task('test', function() {
    gulp.src('spec/**/*.php')
        .pipe(run('clear'))
        .pipe(phpspec('', { notify: true }))
        .on('error', notify.onError({
            title: 'Hey Fabri!!',
            message: 'Your tests failed!',
            icon: __dirname + '/fail.png'
        }))
        .pipe(notify({
            title: 'Amazing Fabri!',
            message: 'All tests have returned green!',
            icon: __dirname + '/success.png'
        }));
});

// Watcher
gulp.task('watch', function() {
    gulp.watch(['spec/**/*.php', 'app/**/*.php'], ['test']);
});

// Default Tasks
gulp.task('default', ['test', 'watch']);

The error:

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: write EPIPE
    at errnoException (net.js:901:11)
    at Object.afterWrite (net.js:718:19)

If you can help me to fix this issue will be fantastic! Thanks

Hi!
As far as I can deduce this is an issue with the gulp-phpspec module and the command that is being run in it. It seem gulp-phpspec doesn't handle errors correctly. You should post an issue here: https://github.com/mikeerickson/gulp-phpspec/issues

Thanks a lots for your suggest, I'll post the issue there! :)