I have a Meteor app that renders a PDF server-side using html-pdf
. The app is deployed with mup
. Locally, everything works fine. Upon deployment, I see this error in the server logs:
events.js:72
throw er; // Unhandled 'error' event
^
Error: write EPIPE
at errnoException (net.js:905:11)
at Object.afterWrite (net.js:721:19)
error: Forever detected script exited with code: 8
error: Script restart attempt #1
Versions of stuff:
The fix: sudo apt-get install libfontconfig
I noticed that html-pdf
depends on and installs phantomjs
itself. I found a couple of compiled phantomjs
binaries:
/opt/testapp/app/programs/server/npm/testpackage/node_modules/html-pdf/node_modules/phantomjs/bin/phantomjs
/opt/testapp/app/programs/server/npm/testpackage/node_modules/html-pdf/node_modules/phantomjs/lib/phantom/bin/phantomjs
When I tried to run either binary directly, I got this error:
error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory
A web search turned up this secret dependency.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With