Alexa node.js sdk 错误 requestHandler.canHandle 不是函数

Alexa node.js sdk error requestHandler.canHandle is not a function

我在使用 node.js 的 Alexa SDK 时遇到此错误。有什么想法吗?

this.skill = Alexa.SkillBuilders.custom()
            .addRequestHandlers(
                intendsArray
            ).create();

TypeError: requestHandler.canHandle is not a function

这个问题是因为我忘记在 addRequestHandlers() 函数的数组前添加三个点 ...

this.skill = Alexa.SkillBuilders.custom()
            .addRequestHandlers(
                ...intendsArray
            ).create();