Problem on deployment on Lambda

amazon-alexa

#1

Hi,

I’m trying to deploy my code on lambda, I upload the .zip file for my lamba function but when I test it, this error appears.

{
“errorType”: “TypeError”,
“errorMessage”: “this.toIntent is not a function”,
“trace”: [
“TypeError: this.toIntent is not a function”,
" at AlexaSkill.NEW_SESSION (/var/task/app.js:43:25)",
" at Function.handleOnPromise (/var/task/node_modules/jovo-framework/dist/src/middleware/Handler.js:73:39)",
" at Function.handleOnNewSession (/var/task/node_modules/jovo-framework/dist/src/middleware/Handler.js:48:23)",
" at handle (/var/task/node_modules/jovo-framework/dist/src/middleware/Handler.js:195:23)",
" at processTicksAndRejections (internal/process/task_queues.js:97:5)",
" at async Middleware.run (/var/task/node_modules/jovo-framework/node_modules/jovo-core/dist/src/Middleware.js:76:21)",
" at async App.handle (/var/task/node_modules/jovo-framework/node_modules/jovo-core/dist/src/BaseApp.js:193:13)",
" at async App.handle (/var/task/node_modules/jovo-framework/dist/src/App.js:303:9)",
" at async Runtime.exports.handler (/var/task/index.js:26:5)"
]
}

Anyone can help me?

Thank you.


#2

Hey @UmbertoTruscello

How did you build your zip? Did you use npm run bundle ?


#3

HI,

I use “jovo deploy --target zip”


#4

Could you remove /bundle and /node_modules? Then run npmi i and again jovo deploy --target zip


#5

it works.
Thank you!