Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't figure out invalid ELF headers error #1720

Closed
hobgoblina opened this issue Dec 13, 2020 · 2 comments
Closed

Can't figure out invalid ELF headers error #1720

hobgoblina opened this issue Dec 13, 2020 · 2 comments

Comments

@hobgoblina
Copy link

Issue or Feature

Issue

Steps to Reproduce

Canvas was installed as a dependency for the pdf-img-convert module, and is throwing an ELF header error that's preventing my docker container from spinning up. Here's a related issue I made in the pdf-img-convert repo ol-th/pdf-img-convert.js#7

I've got node_modules in my .dockerignore and have tried things mentioned elsewhere like removing the contents of node_modules and reinstalling - no dice. I haven't ran into this issue with any other modules in this environment.

Your Environment

  • Version of node-canvas (output of npm list canvas or yarn list canvas): 2.6.1
  • Environment (e.g. node 4.2.0 on Mac OS X 10.8): node 13.6 in a docker container
@zbjornson
Copy link
Collaborator

That most likely means that the MacOS or Win canvas build is being used on Linux. I don't have much experience with Docker to provide any guidance on how to fix it, but one way or another the npm install step needs to run on Linux so the correct build is downloaded.

@gagangoku
Copy link

In my case I had to add node_modules to the .dockerignore file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants