gpt4 book ai didi

node.js - meteor EPIPE 错误中的 html-pdf

转载 作者:搜寻专家 更新时间:2023-10-31 23:09:14 27 4
gpt4 key购买 nike

我有一个 Meteor 应用程序,它使用 html-pdf 在服务器端呈现 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

东西的版本:

  • Ubuntu 14.04.2 LTS
  • meteor 1.0.4.2
  • Node.js 0.10.37
  • 0.9.7 分

最佳答案

总结

修复: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 .

关于node.js - meteor EPIPE 错误中的 html-pdf,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29245592/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com