Fontconfig error: Cannot load default config file
alex-voyage
TRIALOP
a year ago
Hey everyone, had some issues with an npm package I am using, deployed on a railway app
This is the npm package: https://www.npmjs.com/package/text-to-image
I am using Node v20.x
I use this library to generate an image. Works great on a local ubuntu machine
But as soon as it is deployed to Railway I get this error in my logs:
Fontconfig error: Cannot load default config file
I even configured my own local font in a local .ftt file, but still get the same issue.
The above library relies on canvas, which could be the source of the issue, anyone seen anything similar?
1 Replies
brody
EMPLOYEE
a year ago
Try adding fontconfig as shown here - https://github.com/brody192/node-canvas-fonts/blob/main/railway.json
