gulp 4 cannot find gulp.parallel | gulp.series

Created on 18 Apr 2016  ·  11Comments  ·  Source: gulpjs/gulp

I use gulp 4, and there is an error showing "gulp.parallel is not a function".

I am here. @mikestreety
gulp -v show

CLI version 1.2.1
Local version 3.9.1

This is my gulpfile, I delete some code and these code will cause the same result.

var fs = require('fs');
var _path = require('path');
var gulp = require('gulp')
var newer = require('gulp-newer');
var modify = require('gulp-modify');
var uglify = require('gulp-uglify')
var cleanCSS = require('gulp-clean-css');
var htmlmin = require('gulp-htmlmin');
var imagemin  = require('gulp-imagemin');

gulp.task('default', gulp.parallel(function () {
    console.log('finish')
}))

Most helpful comment

$ npm install --save-dev gulp
...will get you 3.9.1

$ npm install gulpjs/gulp.git#4.0 --save-dev
...did not work for me (zsh: no matches found), I had to write it in quotes:

$ npm install 'gulpjs/gulp.git#4.0' --save-dev
...so you'll get 4.0.alpha

All 11 comments

What makes you think that your version is gulp 4, when Local version tells you it's 3.9.1?
Try updating local gulp to v4.

@Nirazul Because I done everything according to documentation.

@zyf0330 I've just re-followed my instructions for the global and local installation on my blog post (as per original issue raised)

And got the following:

$ gulp -v
[11:39:21] CLI version 1.2.1
[11:39:21] Local version 4.0.0-alpha.2

Your gulpfile then runs fine.

$ gulp
[11:42:13] Using gulpfile ~/Sites/gulp-v4/gulpfile.js
[11:42:13] Starting 'default'...
[11:42:13] Starting '<anonymous>'...
finish

I just did as getting started

$ npm install --save-dev gulp
...will get you 3.9.1

$ npm install gulpjs/gulp.git#4.0 --save-dev
...did not work for me (zsh: no matches found), I had to write it in quotes:

$ npm install 'gulpjs/gulp.git#4.0' --save-dev
...so you'll get 4.0.alpha

Thanks. I know now, just misunderstood.

Nirazul [email protected]于2016年4月18日周一 下午7:08写道:

$ npm install --save-dev gulp
...will get you 3.9.1

$ npm install gulpjs/gulp.git#4.0 --save-dev
...did not work for me (zsh: no matches found), I had to write it in
quotes:

$ npm install 'gulpjs/gulp.git#4.0' --save-dev


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/gulpjs/gulp/issues/1606#issuecomment-211330924

追随

@Nirazul That's interesting. Thanks for pointing that out!

I use windows, and npm install gulpjs/gulp.git#4.0 --save-dev is useful.

Mike Street [email protected]于2016年4月18日周一 下午7:11写道:

@Nirazul https://github.com/Nirazul That's interesting. Thanks for
pointing that out!


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/gulpjs/gulp/issues/1606#issuecomment-211332820

追随

Support questions should be directed to StackOverflow

Why don't publish a 4.0-alpha version in npm?

@xcatliu it looks like you missed https://github.com/gulpjs/gulp/issues/1486

Was this page helpful?
0 / 5 - 0 ratings