Skip to content

invalid ELF header (Amazon Lambda related?) #76

Answered by samizdatco
fsobh asked this question in Q&A
Discussion options

You must be logged in to vote

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 node_modules directory that it sets up should compatible with Amazon Linux.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by fsobh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #72 on January 15, 2022 19:30.