hapijs / glue

Server composer for hapi.js
Other
245 stars 62 forks source link

How can I use standard modules as plugins? #109

Closed avbalen closed 6 years ago

avbalen commented 6 years ago

In Glue 4.2.0, I used a number of standard modules (hapi-auth-jwt2, lout,...) as plugin in the manifest. However, if I do the same in Glue 5.0.0 with this manifest

register: { plugins: [ 'hapi-auth-jwt2', 'lout', 'inert', 'vision', { plugin: 'visionary', options: { engines: { pug: 'pug' }, relativeTo: __dirname, path: './server/web' } },..... I get the message "name" is required (invalid plugin options). What is the correct manifest for Hapi 17 and Glue 5, using Confidence as store?

WesTyler commented 6 years ago

That is the error message you get from hapi v17 when you register a plugin that hasn’t been updated from hapi v16 yet.

I think it may be hapi-auth-jwt2 in that list, but I’m not sure. Check that the plugins you’re using have all been updated to hapi 17 and that you are using the proper version

On Sat, Dec 16, 2017 at 3:01 PM Auke notifications@github.com wrote:

In Glue 4.2.0, I used a number of standard modules (hapi-auth-jwt2, lout,...) as plugin in the manifest. However, if I do the same in Glue 5.0.0 with this manifest

register: { plugins: [ 'hapi-auth-jwt2', 'lout', 'inert', 'vision', { plugin: 'visionary', options: { engines: { pug: 'pug' }, relativeTo: __dirname, path: './server/web' } },..... I get the message "name" is required (invalid plugin options). What is the correct manifest for Hapi 17 and Glue 5, using Confidence as store?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hapijs/glue/issues/109, or mute the thread https://github.com/notifications/unsubscribe-auth/ALl4O4LEHKXhKENohhCE8ldGno74TU_Fks5tBC_GgaJpZM4REdQA .

avbalen commented 6 years ago

Thanks for the quick answer. Unfortunately many plugins like hapi-auth-jwt2, lout, vision have not yet been updated to hapi v17. I think I might better postpone the move to hapi v17 for my application until the "dust has settled", i.e. most plugin maintainers had the chance to do the update. Moving to the new version is quite some effort, I am afraid.

WesTyler commented 6 years ago

Vision is actually updated in v5, but yeah lout and hapi-auth-jwt2 aren't yet. :\

lock[bot] commented 4 years ago

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.