You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upgrading node breaks gulp 3. gulpjs/gulp#2324
gulp 4 is significantly different from 3 and requires significant changes to the gulpfile.babel.js file.
Sub plot:
For some reason, I had a heck of a time installing gulp 4.0, even npm update gulp -g gets me 3.9.1. And yes, I've completely uninstalled and re-installed. Finally found: lemonstand/lscloud-theme-bones#52
which shows npm install gulp@4 to which I added the --save-dev flag. That got the current gulp version 4, but as expected, this triggers a rash of problems.
The first is related to : gulpjs/undertaker#54
Because gulp.task(name, deps, func) was replaced by gulp.task(name, gulp.{series|parallel}(deps, func)). This requires updates to any tasks with a dep which must be carefully implemented: https://fettblog.eu/gulp-4-parallel-and-series/
There is only once case of a dep in the file, but updating it to: gulp.task('watch-all', gulp.series('browserify-watch'), () => {
results in an error "Task never defined: browserify-watch" even though it is defined later in the file, because gulp 4 has issues with forward references.
Upgrading node breaks gulp 3.
gulpjs/gulp#2324
gulp 4 is significantly different from 3 and requires significant changes to the gulpfile.babel.js file.
Sub plot:
For some reason, I had a heck of a time installing gulp 4.0, even
npm update gulp -g
gets me 3.9.1. And yes, I've completely uninstalled and re-installed. Finally found:lemonstand/lscloud-theme-bones#52
which shows
npm install gulp@4
to which I added the --save-dev flag. That got the current gulp version 4, but as expected, this triggers a rash of problems.The first is related to :
gulpjs/undertaker#54
Because
gulp.task(name, deps, func)
was replaced bygulp.task(name, gulp.{series|parallel}(deps, func))
. This requires updates to any tasks with a dep which must be carefully implemented:https://fettblog.eu/gulp-4-parallel-and-series/
There is only once case of a dep in the file, but updating it to:
gulp.task('watch-all', gulp.series('browserify-watch'), () => {
results in an error "Task never defined: browserify-watch" even though it is defined later in the file, because gulp 4 has issues with forward references.
Moving the section:
To the end of the file resolves the issue and
gulp -T
shows the tree.However, actually running gulp errors on line 27 with "gulp.hasTask is not a function". This requires all the runSequences to be converted to gulp.series.
https://stackoverflow.com/questions/48513573/gulp-error-gulp-hastask-is-not-a-function
E.g.
becomes:
gulp.task('default', gulp.series('server', 'build', 'restart', 'watch-all'), cb => cb())
But that then causes ALL the forward references to be an issue.
Gulp 4 is a… bridge too far. Any ideas for a... simpler re-build system? Or can anyone who is used to this upgrade help with the file?
The text was updated successfully, but these errors were encountered: