0

installing gulp locally

var gulp = require('gulp')
	uglify = require('gulp-uglify');

gulp.task('default', function(){
	gulp.src('js/*.js')
	.pipe(uglify())
	.pipe(gulp.dest('minjs'));
});

so this error occurred

1
  • You need a return in a gulp task. See the answer below. Commented Dec 11, 2018 at 15:43

1 Answer 1

2

Please don't post errors as images next time.

You need to return the pipeline from the function:

gulp.task("default", function() {
  return gulp
    .src("js/*.js")
    .pipe(uglify())
    .pipe(gulp.dest("minjs"));
});
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.