1

我刚刚开始使用 Gulp,并且遇到了一个间歇性问题,有时我会收到以下错误,该错误在配置没有变化的情况下发生,并且只有在我重新启动时才会消失,我已经删除了node_modules, 和/tmp, 它没有任何区别,我正在运行 Ubuntu 14.10:

$ gulp test
[21:31:52] Using gulpfile ~/work/kata/gulpfile.js
[21:31:52] Starting 'test'...
[21:31:52] Finished 'test' after 8.92 ms

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

这是我的 gulpfile.js:

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

gulp.task('test', function() {
   gulp.src('spec/**/*.php')
       .pipe(run('clear'))
       .pipe(phpspec('', {notify: true, verbose: 'vvv' }))
       .on('error', notify.onError({
            title: 'PHPspec Tests:',
            message: 'Failed'
       }))
       .pipe(notify({ title: 'PHPspec Tests:', message: 'Passed' }));
});

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


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

更新:

今天早上 Gulp 再次工作,没有重新启动,此后又停止工作,所有配置都没有任何更改。

4

0 回答 0