[英]html-pdf in meteor EPIPE error
I have a Meteor app that renders a PDF server-side using html-pdf
.我有一个 Meteor 应用程序,它使用
html-pdf
呈现 PDF 服务器端。 The app is deployed with mup
.该应用程序是使用
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
修复:
sudo apt-get install libfontconfig
I noticed that html-pdf
depends on and installs phantomjs
itself.我注意到
html-pdf
依赖并安装了phantomjs
本身。 I found a couple of compiled phantomjs
binaries:我找到了几个编译好的
phantomjs
二进制文件:
/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 .网络搜索发现了这个秘密依赖。
This problem occurs also in Ubuntu v18.04.5这个问题也在 Ubuntu v18.04.5 中出现
After install the below command it was working fine for me.安装以下命令后,它对我来说工作正常。
sudo apt-get install libfontconfig
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.