skill-sample-nodejs-berry-bash
skill-sample-nodejs-berry-bash copied to clipboard
Cannot Find Module "ask-sdk"
Hi, when testing this in the Developer Portal and in Lambda, I am coming up with an error launching.
From Lambda:
{
"errorMessage": "Cannot find module 'ask-sdk'",
"errorType": "Error",
"stackTrace": [
"Function.Module._load (module.js:417:25)",
"Module.require (module.js:497:17)",
"require (internal/module.js:20:19)",
"Object.
Log Output:
START RequestId: 0bf41842-b51f-11e8-a476-8163611deecf Version: $LATEST
Unable to import module 'index': Error
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.
This is my first coding experience, so I'm not quite sure what it isn't finding and how to fix it.
maybe you forgot to do npm install before to send folder to lambda
I think that the problem is that the instructions tell you to set up the Lambda function using the alexa-skill-kit-sdk-factskill Blueprint, then replace index.js with the one from this repository. This template uses V2 of the SDK, while the Blueprint may use V1. The Blueprint is considered obsolete, and probably hasn't been updated.
If you use the ASK CLI to deploy, it doesn't use the Blueprint to set up the Lambda function, and everything seems to work.
This may also be the cause of some of the other issues posted.