在下面运行 gulp 任务时,我从 JSmin 收到以下错误消息:
/var/www/html/a/node_modules/gulp-jsmin/node_modules/jsmin-sourcemap/node_modules/jsmin2/lib/jsmin.c.index.js:40
stream.write(str);
^
TypeError: Object function (err) {
// Add the error to output
options.error += err;
} has no method 'write'
at fputs (/var/www/html/a/node_modules/gulp-jsmin/node_modules/jsmin-sourcemap/node_modules/jsmin2/lib/jsmin.c.index.js:40:18)
at error (/var/www/html/a/node_modules/gulp-jsmin/node_modules/jsmin-sourcemap/node_modules/jsmin2/lib/jsmin.c.index.js:89:9)
at action (/var/www/html/a/node_modules/gulp-jsmin/node_modules/jsmin-sourcemap/node_modules/jsmin2/lib/jsmin.c.index.js:218:25)
at jsmin (/var/www/html/a/node_modules/gulp-jsmin/node_modules/jsmin-sourcemap/node_modules/jsmin2/lib/jsmin.c.index.js:352:21)
at main (/var/www/html/a/node_modules/gulp-jsmin/node_modules/jsmin-sourcemap/node_modules/jsmin2/lib/jsmin.c.index.js:368:9)
at jsminFn (/var/www/html/a/node_modules/gulp-jsmin/node_modules/jsmin-sourcemap/node_modules/jsmin2/lib/jsmin.c.index.js:373:12)
at jsmin (/var/www/html/a/node_modules/gulp-jsmin/node_modules/jsmin-sourcemap/node_modules/jsmin2/lib/jsmin.js:82:3)
at Object.Collector.addFile (/var/www/html/a/node_modules/gulp-jsmin/node_modules/jsmin-sourcemap/lib/jsmin.sourcemap.js:24:19)
at Array.forEach (native)
at module.exports (/var/www/html/a/node_modules/gulp-jsmin/node_modules/jsmin-sourcemap/lib/jsmin.sourcemap.js:136:9)
/** Gulp 任务 **/
gulp.task('js', function() {
gulp.src('app/assets/javascripts/**/*.js')
.pipe(changed('public/assets/javascripts/min'))
.pipe(jsmin())
.pipe(rename({suffix: '.min'}))
.pipe(gulp.dest('public/assets/javascripts/min'));
gulp.src([ 'public/assets/javascripts/min/bootstrap.min.js','public/assets/javascripts/min/jquery.flexslider.min.js','public/assets/javascripts/min/waypoints.min.min.js',
'public/assets/javascripts/min/modernizr.custom.min.js','public/assets/javascripts/min/jquery.stapel.min.js', 'public/assets/javascripts/min/jquery.socialist.min.js',
'public/assets/javascripts/min/enscroll.min.min.js','public/assets/javascripts/min/jquery-ui-1.8.2.custom.min.min.js','public/assets/javascripts/min/pirobox_extended_min.min.js',
'public/assets/javascripts/min/jquery.masonry.min.min.js', 'public/assets/javascripts/min/functions.min.js'])
.pipe(concat('application.js'))
.pipe(gulp.dest('public/assets/javascripts/min/'));
});
有人可以帮我弄清楚发生了什么吗?