Built version doesn't work
xopo opened this issue · 1 comments
xopo commented
I followed the instructions from https://github.com/alixaxel/chrome-aws-lambda#aws-lambda-layer
I created a new layer with the resulted archive chrome_aws_lambda.zip
When I try to use it I get this error
{
"errorType": "Runtime.ImportModuleError",
"errorMessage": "Error: Cannot find module 'lambdafs'\nRequire stack:\n- /opt/nodejs/node_modules/chrome-aws-lambda/source/index.js\n- /var/task/handler.js\n- /var/runtime/UserFunction.js\n- /var/runtime/index.js",
"trace": [
"Runtime.ImportModuleError: Error: Cannot find module 'lambdafs'",
"Require stack:",
"- /opt/nodejs/node_modules/chrome-aws-lambda/source/index.js",
"- /var/task/handler.js",
"- /var/runtime/UserFunction.js",
"- /var/runtime/index.js",
" at _loadUserApp (/var/runtime/UserFunction.js:100:13)",
" at Object.module.exports.load (/var/runtime/UserFunction.js:140:17)",
" at Object.<anonymous> (/var/runtime/index.js:43:30)",
" at Module._compile (internal/modules/cjs/loader.js:1015:30)",
" at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)",
" at Module.load (internal/modules/cjs/loader.js:879:32)",
" at Function.Module._load (internal/modules/cjs/loader.js:724:14)",
" at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)",
" at internal/main/run_main_module.js:17:47"
]
}
The error is not present when I use the arn:aws:lambda:us-east-1:764866452798:layer:chrome-aws-lambda:22 layer.
xopo commented
I run the process on another machine ( Linux this time ) and it worked.