gulp-usemin icon indicating copy to clipboard operation
gulp-usemin copied to clipboard

TypeError: listener must be a function

Open G33kLabs opened this issue 9 years ago • 0 comments

Hi !

I've just updated modules with npm update and have currently this issue after the upgrade :

[12:55:30] 'build-usemin' errored after 51 ms
[12:55:30] TypeError: listener must be a function
    at TypeError (native)
    at Stream.addListener (events.js:142:11)

gulp : 3.9.0 gulp-usemin : 0.3.14

Task :

gulp.task('build-html', function() {
    return gulp.src(paths.html)
        .pipe(plumber())
        .pipe($.if($.isBuild, $.usemin({
            js: [$.uglify({
                mangle: true,
                compress: true
            }), $.rev()]
        })))
        .pipe(
            $.if(!$.isBuild,
                $.usemin()
            )
        )
        .pipe(gulp.dest(paths.output));
});

Hoping this could help !

G33kLabs avatar Sep 02 '15 10:09 G33kLabs