This might have come in late but for anyone still interested in keeping their Node v12 while using the latest gulp ^4.0, follow these steps:
Update the command-line interface (just for precaution) using:
npm i gulp-cli -g
Add/Update the gulp
under dependencies section of your package.json
"dependencies": {
"gulp": "^4.0.0"
}
Delete your package-lock.json
file
Delete your node_modules
folder
Finally, Run npm i
to upgrade and recreate brand new node_modules folder and package-lock.json file with correct parameters for Gulp ^4.0
npm i
Note Gulp.js 4.0 introduces the series()
and parallel()
methods to combine tasks instead of the array methods used in Gulp 3, and so you may or may not encounter an error in your old gulpfile.js
script.
To learn more about applying these new features, this site have really done justice to it: https://www.sitepoint.com/how-to-migrate-to-gulp-4/
(If it helps, please leave a thumps up)