Loskir / styled-qr-code

Automaticly generate your styled QR code in your web app.
https://qr-code-styling.com
MIT License
36 stars 23 forks source link

Error: Error loading shared library libfontconfig.so.1: No such file or directory (needed by /app/node_modules/skia-canvas/lib/v6/index.node) #6

Closed sa-od closed 8 months ago

sa-od commented 8 months ago

It was working well on local, but start getting error while deployed on Render

Node FROM node:21.5.0-alpine

Shell uname Linux srv-cir6bq5gkuvqadosit5g-7c9bc6977f-z6pcl 5.15.0-1032-gke #37-Ubuntu SMP Wed Apr 19 21:06:04 UTC 2023 x86_64 Linux

I have tried apk add fontconfig apk --no-cache add fontconfig

npm i skia-canvas in the project

sa-od commented 8 months ago

I have checked the skia-canvas doc, which a shared library of of @loskir/styled-qr-code-node

and found that to use skia-canvas you need to add fontconfig script while using docker https://www.npmjs.com/package/skia-canvas?activeTab=readme

Thank you 😊.