question

Brian Singerman avatar image
Brian Singerman asked

string var function fail for ScoreKeeper test App

Hi all, I am working on getting all the sample apps to work with AWS Lambda and node.js to learn, and I got through that! However, I have encountered a very strange problem with the ScoreKeeper app. When I change the APP_ID variable to my AWS App Id ( var APP_ID = "amzn1.echo-sdk-ams.app.xxxxx";) AWS lambda spits up on that. If I keep it as APP_ID = undefined, it works great. I am using the correct APP_ID, that's not the problem. In fact, if I try to declare a variable right above that: var hello = "helloworld"; I get the same "syntax error" in the Lambda logs! Anyone know why assigning any string constant variables to the ScoreKeeper.js file would cause it to crash? In other words, if I just switch the comment line in the below, it crashes. Thanks for any help! Here is full code section: 'use strict'; var AlexaSkill = require('./AlexaSkill'), eventHandlers = require('./eventHandlers'), intentHandlers = require('./intentHandlers'); var APP_ID = undefined; // var APP_ID = “amzn1.echo-sdk-ams.app.xxxxxxx”; var skillContext = {}; Brian
alexa skills kitdebugging
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

justin avatar image
justin answered
EDIT: Brian, could you please make sure the quotes you for the strings you are building are using standard quotes? " vs “ This may be an issue with how your syntax editor is using this for strings. Hi Brian, This sounds quite strange -- is there any way you could please share the error that the Lambda function is outputting? There should be a more detailed syntax error in the cloudwatch logs to explain what the root cause is, but my guess is it may be something completely different that is causing this to break. Thanks! Justin
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Brian Singerman avatar image
Brian Singerman answered
As embarassing as it is, I think this solves it. Thanks Justin and sorry about that!
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.