alexa-samples / skill-sample-nodejs-adventure-game

This tool provides an easy to use front-end that allows developers to instantly deploy code for your story, or use the generated code as a starting point for more complex projects.
Apache License 2.0
510 stars 218 forks source link

Successfully Uploaded but failed at AWS Lambda #32

Closed chai41104 closed 7 years ago

chai41104 commented 7 years ago

Hi,

I got "successfully Uploaded" but when I tested at AWS Lambda I got an error message.

{ "errorMessage": "Cannot find module '/var/task/index'", "errorType": "Error", "stackTrace": [ "Function.Module._load (module.js:417:25)", "Module.require (module.js:497:17)", "require (internal/module.js:20:19)" ] }

P.S. I use window 7, I am not sure that is related or not.

Best Wishes,

Thongchai

chai41104 commented 7 years ago

Hi,

I know the issue now and fix it now.

The issue is that the zip file has a base at '.'. When I change the base to './src/skill/', it works for me.

edit _upload.js

line 15: 'return gulp.src('./src/skill/*/.{js,json}', { base: "." })'

to

line 15: 'return gulp.src('./src/skill/*/.{js,json}', { base: "./src/skill/" })'

I hope it works for another.

Best Wishes,

Thongchai