Gulp 在巴贝尔不工作之前大口大口大口大口大口大口大口地浏览

Gulp 在巴贝尔不工作之前大口大口大口大口大口大口大口地浏览,gulp,babelify,Gulp,Babelify,所以我试图使用babelify,但我无法让它工作?我错过什么了吗?在本例中,这是我的任务之一。我补充说巴贝利菲·威奇的表现很好,现在我需要添加布劳塞里菲。谢谢 const config = require('./gulp.config.js')(); const gulp = require('gulp'); const gulpLoadPlugins = require('gulp-load-plugins'); const plugs = gu

所以我试图使用babelify,但我无法让它工作?我错过什么了吗?在本例中,这是我的任务之一。我补充说巴贝利菲·威奇的表现很好,现在我需要添加布劳塞里菲。谢谢

const config = require('./gulp.config.js')();
        const gulp = require('gulp');
        const gulpLoadPlugins = require('gulp-load-plugins');
        const plugs = gulpLoadPlugins();
        const bs = require('browser-sync');
        const env = process.env.NODE_ENV || 'local';
        const merge = require('merge-stream');
        const imagemin = require('gulp-imagemin');
        const browserify = require('browserify');
        const babelify = require('babelify');
        const clean = require('gulp-clean');
        const eventStream = require('event-stream');
        const optimize = false;
        const babel = require('gulp-babel'); 



       gulp.task('scripts-app', ['compile-jade'], () => {

          const scriptsStream = gulp.src(config.appFolder + '**/*.js'),
            templateCacheStream = gulp.src(config.appFolder + '**/*.html')
              .pipe(plugs.angularTemplatecache(config.templateCache.file, config.templateCache.options));
          console.log(plugs.order(config.jsOrder));

          return eventStream.merge(templateCacheStream, scriptsStream)
            .pipe(plugs.order(config.jsOrder))
            .pipe(plugs.concat(`${config.projectName}.js`))
            /*.pipe(browserify({
              insertGlobals: true,
              debug: true
            }))*/
            .pipe(babel({
              presets: ['es2015']
            }))
            .pipe(plugs.if(optimize, plugs.uglify()))
            .pipe(gulp.dest(config.build));

        });
这是我运行任务时得到的错误日志,显然我做错了什么

[10:39:33] 'scripts-app' errored after 90 ms
  [10:39:33] TypeError: eventStream.merge(...).pipe(...).pipe(...).pipe(...).pipe is not a function
at Gulp.<anonymous> (/home/hb/apps/suggestions/gulpfile.babel.js:83:6)
at module.exports (/home/hb/apps/suggestions/node_modules/orchestrator/lib/runTask.js:34:7)
at Gulp.Orchestrator._runTask (/home/hb/apps/suggestions/node_modules/orchestrator/index.js:273:3)
at Gulp.Orchestrator._runStep (/home/hb/apps/suggestions/node_modules/orchestrator/index.js:214:10)
at /home/hb/apps/suggestions/node_modules/orchestrator/index.js:279:18
at finish (/home/hb/apps/suggestions/node_modules/orchestrator/lib/runTask.js:21:8)
at /home/hb/apps/suggestions/node_modules/orchestrator/lib/runTask.js:52:4
at f (/home/hb/apps/suggestions/node_modules/once/once.js:17:25)
at DestroyableTransform.onend (/home/hb/apps/suggestions/node_modules/end-of-stream/index.js:31:18)
at emitNone (events.js:91:20)
/home/hb/apps/suggestions/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:612
var ret = dest.write(chunk);
^

TypeError: dest.write is not a function
at DestroyableTransform.ondata (/home/hb/apps/suggestions/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:612:20)
at emitOne (events.js:96:13)
at DestroyableTransform.emit (events.js:191:7)
at addChunk (/home/hb/apps/suggestions/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:284:12)
at readableAddChunk (/home/hb/apps/suggestions/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:271:11)
at DestroyableTransform.Readable.push (/home/hb/apps/suggestions/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:238:10)
at DestroyableTransform.Transform.push (/home/hb/apps/suggestions/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:146:32)
at DestroyableTransform.endStream [as _flush] (/home/hb/apps/suggestions/node_modules/gulp-concat/index.js:96:10)
at DestroyableTransform.<anonymous> (/home/hb/apps/suggestions/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:138:49)
at Object.onceWrapper (events.js:293:19)
[10:39:33]“脚本应用程序”在90毫秒后出错
[10:39:33]类型错误:eventStream.merge(…).pipe(…).pipe(…).pipe(…).pipe不是函数
狼吞虎咽。(/home/hb/apps/suggestions/gulpfile.babel.js:83:6)
在module.exports(/home/hb/apps/suggestions/node_modules/orchestrator/lib/runTask.js:34:7)
在Gulp.Orchestrator.\u runTask(/home/hb/apps/suggestions/node\u modules/Orchestrator/index.js:273:3)
运行步骤(/home/hb/apps/suggestions/node\u modules/Orchestrator/index.js:214:10)
at/home/hb/apps/suggestions/node_modules/orchestrator/index.js:279:18
完成时(/home/hb/apps/advisions/node_modules/orchestrator/lib/runTask.js:21:8)
at/home/hb/apps/suggestions/node_modules/orchestrator/lib/runTask.js:52:4
在f(/home/hb/apps/suggestions/node_modules/once/once.js:17:25)
在DestroyableTransform.oned(/home/hb/apps/suggestions/node_modules/end of stream/index.js:31:18)
在emitNone(events.js:91:20)
/home/hb/apps/suggestions/node_modules/through2/node_modules/readable stream/lib/_stream_readable.js:612
var ret=dest.write(块);
^
TypeError:dest.write不是函数
在DestroyableTransform.ondata(/home/hb/apps/suggestions/node_modules/through2/node_modules/readable stream/lib/_stream_readable.js:612:20)
在emitOne(events.js:96:13)
位于DestroyableTransform.emit(events.js:191:7)
在addChunk(/home/hb/apps/suggestions/node_modules/through2/node_modules/readable stream/lib/_stream_readable.js:284:12)
在readableAddChunk(/home/hb/apps/suggestions/node_modules/through2/node_modules/readable stream/lib/_stream_readable.js:271:11)
在DestroyableTransform.Readable.push(/home/hb/apps/suggestions/node_modules/through2/node_modules/Readable stream/lib/_stream_Readable.js:238:10)
在DestroyableTransform.Transform.push(/home/hb/apps/suggestions/node_modules/through2/node_modules/readable stream/lib/_stream_Transform.js:146:32)
DestroyableTransform.endStream[as _flush](/home/hb/apps/suggestions/node_modules/gulp concat/index.js:96:10)
在一次彻底的变革中。(/home/hb/apps/suggestions/node_modules/through2/node_modules/readable stream/lib/_stream_transform.js:138:49)
在Object.onceWrapper(events.js:293:19)