我不断收到来自AWS lambda的错误。我不确定这是什么类型的语法错误。任何人都可以解释一下这里可能会发生什么?
var str = $('some selector id').innerHTML();
var result = str.indexOf("as");
这是我在第60行的Index.js文件:
Syntax error in module 'index': SyntaxError
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
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.<anonymous> (/var/task/index.js:60:14)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
这是我的Task.js文件:
var DocumentDBClient = require('documentdb').DocumentClient;
var HttpStatusCodes = { NOTFOUND: 404 };
var config = require('./config');
var dbTask = require('./Task'); // <-- index.js line 60