0
当我在拉姆达在线代码编辑器测试代码,我总是得到这样的错误:我收到“错误信息:过程完成请求之前退出”
"errorMessage": "RequestId: b8efba3e-8940-11e7-a176-e7452208b749 Process exited before completing request"
下面是代码(我代替我的代码带有示例表格亚马逊只是为了查看它是否只是我的代码):
'use strict';
var Alexa = require("aws-sdk");
exports.handler = function(event, context, callback) {
var alexa = Alexa.handler(event, context);
alexa.registerHandlers(handlers);
alexa.execute();
};
var handlers = {
'LaunchRequest': function() {
this.emit('SayHello');
},
'HelloWorldIntent': function() {
this.emit('SayHello');
},
'SayHello': function() {
this.emit(':tell', 'Hello World!');
}
};
这个在声明结尾似乎没有分号。 “HelloWorldIntent”:function(){ this.emit('SayHello') }“ – Amit
加上了; ,但仍然有相同的错误 – party58965
你检查处理函数内的“this”的值是否正确? –