This error: {
"errorType": "Runtime.UserCodeSyntaxError",
"errorMessage": "SyntaxError: Invalid or unexpected token",
"trace": [
"Runtime.UserCodeSyntaxError: SyntaxError: Invalid or unexpected token",
" at _loadUserApp (/var/runtime/UserFunction.js:218:13)",
" at Object.module.exports.load (/var/runtime/UserFunction.js:279:17)",
" at Object. (/var/runtime/index.js:43:34)",
" at Module._compile (internal/modules/cjs/loader.js:1085:14)",
" at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)",
" at Module.load (internal/modules/cjs/loader.js:950:32)",
" at Function.Module._load (internal/modules/cjs/loader.js:790:12)",
" at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12)",
" at internal/main/run_main_module.js:17:47"
]
}
chrome-aws-lambda
10.1.0:puppeteer
/puppeteer-core
13.6.0:Expected Behavior
No error happening
Current Behavior
This error: { "errorType": "Runtime.UserCodeSyntaxError", "errorMessage": "SyntaxError: Invalid or unexpected token", "trace": [ "Runtime.UserCodeSyntaxError: SyntaxError: Invalid or unexpected token", " at _loadUserApp (/var/runtime/UserFunction.js:218:13)", " at Object.module.exports.load (/var/runtime/UserFunction.js:279:17)", " at Object. (/var/runtime/index.js:43:34)",
" at Module._compile (internal/modules/cjs/loader.js:1085:14)",
" at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)",
" at Module.load (internal/modules/cjs/loader.js:950:32)",
" at Function.Module._load (internal/modules/cjs/loader.js:790:12)",
" at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12)",
" at internal/main/run_main_module.js:17:47"
]
}
Steps to Reproduce
Dockerfile: FROM amazon/aws-lambda-nodejs:latest
COPY ./* ${LAMBDA_TASK_ROOT} RUN npm install --only=prod
CMD [ "index.handler" ]