Hi,
I have two questions upon conversational components:
- Handler Extraction
- We split code in conversational components to use the standard flow (-> delegate to the component and wait till completed). But there are always some intents which are needed on root level of the skill (and delegate to the component itself). Therefore I wrote a Class “GlobalHandler” of Type Handler and exported it. When I import it in my app.js of the skill and try to set it via
app.setHandler
everything works fine in local mode. But when I upload it to lambda I get the error “Handlers must be of type object”. - some additional information: Our skill is (momently) written in node. But the components are written in typescript. I do not understand why this error occurs. My “nodeHandler” should be of type “any” right? So the exported Handler of type “Handler” should not be a problem.
- Plugin integration:
- the component above also needs a plugin. So I am trying to set it in the components constructor ( like the documentation tells us for nested components). Instead of using
this.useComponent()
I am usingthis.use()
like you normally do for plugins. Is there something missing? If I export the plugin manually and add it in the app.js everthing works fine. But I would like to find a solution which is working without the need to touch more project files.
Could you give some advice?
Thanks in advance
André