invalid ELF header (Amazon Lambda related?) #76
-
undefined ERROR Uncaught Exception |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
can‘t move node_modules to different platform。 |
Beta Was this translation helpful? Give feedback.
-
That stack trace doesn't give me much to go on, but googling for your error message makes it seem like you're trying to run this on Amazon Lambda. Based on this stack overflow answer it sounds like you may have tried to run the module that was compiled for your dev machine on the server. Try using docker as the answer suggests. Something like this: $ mkdir my-project
$ cd my-project
$ npm init -y
$ docker run --rm -v "$PWD":/var/task lambci/lambda:build-nodejs12.x npm i skia-canvas The |
Beta Was this translation helpful? Give feedback.
That stack trace doesn't give me much to go on, but googling for your error message makes it seem like you're trying to run this on Amazon Lambda. Based on this stack overflow answer it sounds like you may have tried to run the module that was compiled for your dev machine on the server.
Try using docker as the answer suggests. Something like this:
The
node_modules
directory that it sets up should compatible with Amazon Linux.