Skip to content

Gulp 4.0.0 not terminating when tasks complete #2159

@curtisc123-zz

Description

@curtisc123-zz

The Gulp process just hangs on finishing and does not complete. CI won't continue so I can't just terminate it manually. This is on Windows 10. I've also added in a process.exit() but then I get this Did you forget to signal async completion? error.

I've tried several different plugins and tasks, but it happens on all of them. Killed all node process, even restarted my computer, but it's still happening.

const gulp = require('gulp');
const less = require('gulp-less');
const stylelint = require('gulp-stylelint');
const cssmin = require('gulp-cssmin');

function stylelintTask () {
	return gulp.src(`${srcDir}/**/*.less`)
		.pipe(stylelint({
			failAfterError: false,
			reporters: [
				{ 
					console: true,
					formatter: 'verbose',  
				},
			],
		}));
}

function lessTask () {
	return gulp.src(`${srcDir}/css/all.less`)
		.pipe(less().on('error', (error) => { console.log(error) }))
		.pipe(cssmin().on('error', (error) => { console.log(error) }))
		.pipe(gulp.dest(`${distDir}/css/`))
}

gulp.task('less', gulp.series(stylelintTask, lessTask));

Windows 10 Environment
Gulp - 4.0.0
Node - 8.11.1
NPM - 5.6.0

Any insight would be great.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions