'use strict'; const Alexa = require('ask-sdk'); const APP_ID = 'insert my ID here'; const handlers = { 'LaunchRequest': function () { this.emit(':tell', 'welcome to dog pictures'); }, 'AMAZON.HelpIntent': function () { this.emit(':tell', 'you can ask for a dog picture by saying dog number 1'); }, 'AMAZON.CancelIntent': function () { this.emit(':tell', 'bye bye, have a nice day'); }, 'AMAZON.StopIntent': function () { this.emit(':tell', 'bye bye, have a nice day'); } }; exports.handler = function (event, context) { const alexa = Alexa.handler(event, context); alexa.APP_ID = APP_ID; alexa.registerHandlers(handlers); alexa.execute(); }; console.log;
Using the alexa-skills-kit-sdk-for-nodejs and this as an index.js i keep getting the error: "TypeError: Alexa.handler is not a function"
I am trying to connect an alexa Skill with AWS Lambda Function.
I can't figure this out on my own. Any help would be appreciated. Thanks for reading this :)