2015-03-25 154 views
4

我有一个Meteor应用程序,它使用html-pdf呈现PDF服务器端。该应用程序部署为mup。在本地,一切正常。在部署时,我看到在服务器日志此错误:东西html-pdf流星EPIPE错误

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 

版本:

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

回答

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 

当我试图直接运行二进制,我得到这个错误:

error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory 

网络搜索变成了这个secret dependency

+1

谢谢!保存了我的一天。 – Chetan 2016-09-28 09:56:33