1
votes

Deployed AWS alexa module using AWS lambda deploy.

my zip file contains. package.json package-lock.json node_modules index.js

When i tested my aws lambda function, it failed with below. I am using amazon alexa API.

function call to voice output is this.emit('some text');

2017-08-14T06:39:47.468Z 5af7ac74-80bb-11e7-9b7e-5b3b7c9fd513 TypeError: Cannot read property 'emit' of undefined at /var/task/index.js:62:31

2
Please paste the code of index.js.jhohlfeld
And btw it's this.emit(':tell', 'Hello World')jhohlfeld
also please point out which library are you using to process the requests. If it is the alexa-sdk or some other third party one you found on npmren.rocks

2 Answers

1
votes

Make sure you have installed 'alexa-sdk' package in your node module (npm install --save alexa-sdk). If you already installed that Please share code of index.js.

1
votes

Probably you haven't upload the libraries in the lambda funcition, if you are using node, you have to upload the node_modules

You should access lambda folder and run "yarn" or "npm install" depending on which one you are using.