Automattic / node-canvas

Node canvas is a Cairo backed Canvas implementation for NodeJS.
10.14k stars 1.17k forks source link

libcairo.so.2: cannot open shared object file #2061

Open dev-fredericfox opened 2 years ago

dev-fredericfox commented 2 years ago

Issue

Works fine on my Mac M1

But I get this error in my CI Pipeline.

libcairo.so.2: cannot open shared object file: No such file or directory at Object.<anonymous> (node_modules/canvas/lib/bindings.js:3:18)

Your Environment

Node Canvas@2.9.1 Running with gitlab-runner 15.1.0~beta.20.g62206bb2 (62206bb2) Tried on: ❌docker image node:15.6.0-buster-slim ❌docker image node:lts-buster-slim ❌docker image node:alpine ✅Mac M1 12.4

natcl commented 2 years ago

If you are running within Docker you'll need to install all the dependencies listed in the readme.

michalflog commented 1 year ago

I have explained some solutions here #1952, maybe it will help 😄