Font Issue
I'm encountering an issue while deploying my app on Railway. Whenever I attempt to import the
captcha-canvas
package it raises the following error Error: libfontconfig.so.1: cannot open shared object file: No such file or directory
. I've only encountered this issue on Railway36 Replies
Project ID:
605ca1f7-cb82-4615-baa5-cd740534065f
try adding a nixpacks.toml file to your project with this
same issue happening
try this instead
yeah its still happening 😭
how can i be sure you are putting that nixpacks.toml in the right place
okay looks good
ill look into this more
i have an example project that uses canvas, this worked for me
(╯°□°)╯︵ ┻━┻
what package are you using
captcha-canvas
yep
that uses skia-canvas, and skia-canvas says you need to apt install libfontconfig1
this is how youd do that, but didnt work
i think its time for a dockerfile
id write one for you, can you share your package.json
sorry, i’ve already shutdown my computer and got in bed. i’ll send it tomorrow when i’m home
no problem, ill prep the dockerfile in the mean time
question, what is the purpose of building your app with tsc then using ts-node to start from the ts file, the build step then seems pointless?
ngl im not sure. i just started working with TS ~2 weeks ago
please come to a proper solution before we proceed, are you gonna use ts-node, or are you gonna build and then run the resulting javascript, please pick one
ts-node I suppose
okay then please remove the build script
you could also try, with
nixpacks.toml
:
does nixLibs make a difference?
yes
It sets env vars so that stuff can find the libraries you've installed
how does one know if you should install a package as a nixPkg or a nixLib, or both, or if you can even install a given package as a Lib?
this worked, the module loads now but there's still some kind of issue happening with the font
(second command is from my local pc running the same code)
looks like its missing fonts
what font does it use
Looks like its using
Sans
that looks like sans to me?
unless I'm misunderstanding
yeah but tiny font
sooo wut should I do
Google lol 🙂
we don't know, sorry
but once you do find a solution, we can do our best to help you apply the solution to your railway deployment