出现错误:找不到 soffice 二进制文件

问题描述 投票:0回答:1

我正在使用 libreoffice-convert 将 docx 文件转换为 pdf。它在我的本地环境中工作正常,但是当部署在 heroku 上时,它会出现此错误。我正在将 docx 文件上传到 s3,然后检索该文件并转换使用 npm 提供的 libreoffice-convert 库将其转换为 pdf。由于它使用 libreoffice,所以对于 heroku 我添加了这些构建包

  1. https://github.com/heroku/heroku-buildpack-apt.git
  2. https://github.com/BlueTeaLondon/heroku-buildpack-libreoffice-for-heroku-18.git 和一个包含这些代码的 aptfile Aptfile

Error Screenshot

node.js heroku libreoffice
1个回答
0
投票

您需要在部署应用程序的实例上安装 libreoffice

© www.soinside.com 2019 - 2024. All rights reserved.