installing texlive-pdftex?
Unanswered
American Shorthair posted this in #help-forum
American ShorthairOP
I want to generate some PDF from latex on the server. Code works locally but needs to have the
I get this error in the install step of my vercel build:
Is there an explainer link somebody has handy if I want to do something like this?
pdflatex command installed, which I think is part of the texlive-pdftex YUM package. Even though I see the package listed here: https://docs.aws.amazon.com/linux/al2023/release-notes/all-packages-AL2023.2.html , and have the following in my vercel.json file:{
"buildCommand": "npm run build",
"framework": "nextjs",
"installCommand": "amazon-linux-extras enable texlive-pdftex && yum -y install texlive-pdftex && npm install"
}I get this error in the install step of my vercel build:
Running "install" command: `amazon-linux-extras enable texlive-pdftex && yum -y install texlive-pdftex && npm install`...
Topic texlive-pdftex is not found.
Error: Command "amazon-linux-extras enable texlive-pdftex && yum -y install texlive-pdftex && npm install" exited with 4Is there an explainer link somebody has handy if I want to do something like this?
1 Reply
American ShorthairOP
Follow-up: this install command
Are the installed packages not visible to serverless functions?
"installCommand": "yum -y install install texlive-* && npm install" in vercel.json completes successfully, but at runtime I still get the following error:Uncaught Exception {"errorType":"Error","errorMessage":"Error: Unable to run pdflatex command.","stack":["Error: Error: Unable to run pdflatex command."," at ChildProcess.<anonymous> (/var/task/.next/server/app/pdf/resume/[id]/route.js:9:953)"," at ChildProcess.emit (node:events:517:28)"," at ChildProcess._handle.onexit (node:internal/child_process:290:12)"," at onErrorNT (node:internal/child_process:477:16)"," at process.processTicksAndRejections (node:internal/process/task_queues:82:21)"]}Are the installed packages not visible to serverless functions?