frankwallis / gulp-hub

Gulp plugin to run tasks in multiple gulpfiles
MIT License
89 stars 24 forks source link

gulp-4.0 requires init() to be defined for custom registries #34

Closed bignall closed 8 years ago

bignall commented 8 years ago

I just upgraded to gulp-4.0. Trying to use gulp-hub (upgraded to the 4.0 branch) results in the following error:

/Users/rosina/Sites/mis/node_modules/gulp/node_modules/undertaker/lib/helpers/validateRegistry.js:36
      throw err;
      ^
AssertionError: Custom registry must have `init` function
    at validateRegistry (/Users/rosina/Sites/mis/node_modules/gulp/node_modules/undertaker/lib/helpers/validateRegistry.js:30:5)
    at Gulp.registry (/Users/rosina/Sites/mis/node_modules/gulp/node_modules/undertaker/lib/registry.js:17:3)
    at Object.<anonymous> (/Users/rosina/Sites/mis/gulpfile.babel.js:8:6)

(The released gulp-hub version used with gulp-4.0 has other errors).

I looked in lib/hub-registry.js and sure enough there's no init() defined on the prototype. I don't know what it's supposed to do, so can't help there and I probably am going to try breaking my tasks up into files without using gulp-hub so I probably won't be able to help test a fix, but I thought I'd let you know about the error.

frankwallis commented 8 years ago

Thanks for raising this, it should be fixed in tag 4.1.0

ginnsquad commented 6 years ago

@bignall You can install the working version of gulp-hub by running npm i --save-dev gulp-hub@frankwallis/gulp-hub#4.1.0.