流星EPIPE错误中的html-pdf

Ada*_*sen 4 pdf node.js npm phantomjs meteor

我有一个Meteor应用程序,它使用PDF服务器端html-pdf.该应用程序已部署mup.在当地,一切正常.部署后,我在服务器日志中看到此错误:

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
Run Code Online (Sandbox Code Playgroud)

东西的版本:

  • Ubuntu 14.04.2 LTS
  • 流星1.0.4.2
  • Node.js 0.10.37
  • mup 0.9.7

Ada*_*sen 5

摘要

修复: sudo apt-get install libfontconfig

细节

我注意到这html-pdf取决于并安装phantomjs自己.我找到了几个已编译的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
Run Code Online (Sandbox Code Playgroud)

当我试图直接运行任何二进制文件时,我收到此错误:

error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory
Run Code Online (Sandbox Code Playgroud)

网络搜索发现了这种秘密依赖.