3
votes

I have set up the Hello World (https://github.com/amzn/alexa-skills-kit-js/tree/master/samples/helloWorld)) sample skill on AWS Lambda and the Alexa Console. But when I go to run it, it gives me this error:

module initialization error: Error at Error (native) at Object.fs.openSync (fs.js:549:18)
at Object.fs.readFileSync (fs.js:397:15)
at Object.Module._extensions..js (module.js:415:20)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (/var/task/index.js:20:18)
at Module._compile (module.js:409:26)

I upload the files on AWS Lambda by creating a zip of the index.js and AlexaSkill.js file found within the src folder. What am I doing wrong?

1
quoted the error messageWill Ray
It used to work fine for me with a custom skill that includes the AlexaSkill helper module, but I am now getting the same error.Jannie Theunissen

1 Answers

1
votes

I had a similar problem. It turned out to be the file permissions on the include file that is bundled with your index.js file. This fixed it for me:

chmod 755 AlexaSkill.js

Before zipping up the bundle and uploading.