Getting below error when testing an alexa hello world skill using nodejs sdk.
Can somebody point out what am I doing wrong
TypeError: Cannot read property 'locale' of undefined
at AlexaRequestEmitter.HandleLambdaEvent (/var/task/n
The offending line in SDK is
function HandleLambdaEvent() {
this.locale = this._event.request.locale;
resolved it myself
How did you resolve the issue? I'm getting the same thing.
I'm also getting this error. Running https://github.com/alexa/skill-sample-nodejs-howto ... Comes up after saving lambda a few times or uploading via zip.
@amitmawkin Any tips on how you resolved the issue?
Make sure you are packaging your node_modules folder in the zip uploaded for your lambda function
Use this starter template to ease deployment headaches.
Alexa Skill Serverless Starter Template
@amitmawkin Can you please elaborate your approach for resolving this error? I didn't find any proper solution to this problem so far. I'm including my node_modules folder in the zip file uploaded to lambda, but i'm getting the same error again and again.. Thanks in advance.
@pdclark did you able to solve your problem. I am having the same. No idea what I am doing wrong.
Remember to zip the contents, not the folder itself! Have you tried that?
@muttoni I have two js files and node_modules folder which I am zipping. I assume this is the right way !!
Hey guys it is a packaging issue. Usage of frameworks like serverless or others are recommended as they take care of packaging problems
try this from terminal from within the your folder having index.js...
zip -r ../lambda.zip *
It can not be a packaging issue. I am hosting the skill on my Ubuntu server with Node and I have the same error with locale: en-us in my request. That locale is enabled and on my linux server.
grrr.... looking in this source code. Is this sdk only meant to be used a lambda function and not on a self hosted node server?