Lambda AWS issue
With nodejs10.x in lambda AWS
const Magic = require('mmmagic')
{
"errorType": "Error",
"errorMessage": "libnode.so.64: cannot open shared object file: No such file or directory",
"trace": [
"Error: libnode.so.64: cannot open shared object file: No such file or directory",
" at Object.Module._extensions..node (internal/modules/cjs/loader.js:807:18)",
" at Module.load (internal/modules/cjs/loader.js:653:32)",
" at tryModuleLoad (internal/modules/cjs/loader.js:593:12)",
" at Function.Module._load (internal/modules/cjs/loader.js:585:3)",
" at Module.require (internal/modules/cjs/loader.js:692:17)",
" at require (internal/modules/cjs/helpers.js:25:18)",
" at Object.
That's a problem with the node installation, not mmmagic.
It happens only with this library
I don't have anything to suggest as I don't use Lambda. mmmagic builds and executes just fine on normal *nix and Windows though.
@hectorprats This should be an issue or question for AWS Lambda on how to fix:
Error: libnode.so.64: cannot open shared object file: No such file or directory"
To make it work for lambda, you MUST install (and implicitly compile) it for the right version of your runtime. It is different from your local machine. To do so you can use for example this docker image: https://hub.docker.com/_/amazonlinux .
Because this issue is very old, it, probably, can be closed.