I've got a very simple node module that I want in AWS lambda, and its importing 'Natural' for some text processing.
This line throws the error: var n = require('natural');
The error is this:
{
"errorMessage": "/var/task/node_modules/webworker-threads/build/Release/WebWorkerThreads.node: invalid ELF header",
"errorType": "Error",
"stackTrace": [
"Module.load (module.js:487:32)",
"tryModuleLoad (module.js:446:12)",
"Function.Module._load (module.js:438:3)",
"Module.require (module.js:497:17)",
"require (internal/module.js:20:19)",
"bindings (/var/task/node_modules/bindings/bindings.js:76:44)",
"Object.<anonymous> (/var/task/node_modules/webworker-threads/index.js:1:105)",
"Module._compile (module.js:570:32)"
]
}
and it returns a
{
"message": "Internal server error"
}
Does AWS lambda not run webworkers? I've tried compiling with nvm 6.10 exactly and rebuilt the zip file, but to no avail. Is there something else I need to include in the zip to make sure the aws lambda env supports the webworker module?
via jamesvillarrubia
No comments:
Post a Comment