Open setevoy2 opened 3 years ago
The deployment guide about AWS Lambda is incomplete and it's hard to realize how to run the code. After eventually ran it, got the error saying:
{ "errorType": "Runtime.UserCodeSyntaxError", "errorMessage": "SyntaxError: Unexpected token '<'", "stack": [ "Runtime.UserCodeSyntaxError: SyntaxError: Unexpected token '<'", " at _loadUserApp (/var/runtime/UserFunction.js:98:13)", " at Object.module.exports.load (/var/runtime/UserFunction.js:140:17)", " at Object. (/var/runtime/index.js:43:30)", " at Module._compile (internal/modules/cjs/loader.js:1072:14)", " at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)", " at Module.load (internal/modules/cjs/loader.js:937:32)", " at Function.Module._load (internal/modules/cjs/loader.js:778:12)", " at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)", " at internal/main/run_main_module.js:17:47" ] } Provide a clear and concise description of the issue, including what you expected to happen.
{ "errorType": "Runtime.UserCodeSyntaxError", "errorMessage": "SyntaxError: Unexpected token '<'", "stack": [ "Runtime.UserCodeSyntaxError: SyntaxError: Unexpected token '<'", " at _loadUserApp (/var/runtime/UserFunction.js:98:13)", " at Object.module.exports.load (/var/runtime/UserFunction.js:140:17)", " at Object. (/var/runtime/index.js:43:30)", " at Module._compile (internal/modules/cjs/loader.js:1072:14)", " at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)", " at Module.load (internal/modules/cjs/loader.js:937:32)", " at Function.Module._load (internal/modules/cjs/loader.js:778:12)", " at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)", " at internal/main/run_main_module.js:17:47" ] }
Provide a clear and concise description of the issue, including what you expected to happen.
As there is no defined Handler in the docs, I did the following:
npm install
node_modules
Now, when creating a PR in a Github repository, it fails with the 500 error and the function's CloudWatch logs days about the "SyntaxError" error.
Runtime: Node.js 14.x (the same issue when using 10.x which is mentioned in the docs) Handler: src.index.lambda
src.index.lambda
Description
The deployment guide about AWS Lambda is incomplete and it's hard to realize how to run the code. After eventually ran it, got the error saying:
Reproduction
As there is no defined Handler in the docs, I did the following:
npm install
to install packages (as previously got the "Runtime.ImportModuleError: Error: Cannot find module '@octokit/rest'" error)node_modules
included and uploaded it to an AWS Lambda functionNow, when creating a PR in a Github repository, it fails with the 500 error and the function's CloudWatch logs days about the "SyntaxError" error.
Environment
Runtime: Node.js 14.x (the same issue when using 10.x which is mentioned in the docs) Handler:
src.index.lambda