puppeteer-pdf
puppeteer-pdf copied to clipboard
Invalid Execution Path
My app is deployed on Heroku and i have added Heroku Buildpacks for Puppeteer Pdf but when i try to Generate the pdf it says {:error, :invalid_exec_path}
The file for puppeteer_pdf
doesn't exists. You can define it with:
config :puppeteer_pdf, exec_path: "/usr/local/bin/puppeteer-pdf"
I'm not sure if this issue is still being maintained, but I'm running into the same problem. The issue is that the exec_path
being specified is not available in our production application's repo (but it is available locally in the same project's directory after running npm install
). So we're not seeing this error when we run the test locally, but we are seeing it in our CI test suite on production.
Is making the puppeteer-pdf directory available somewhere in the project repo (for us, on production) the solution? I would think that the puppeteer-pdf directory would already be available somewhere in the production repo after npm install
is run.
Hi @ddink, I'm not using any project with this library right now and since pdf_generator
has an option to use puppeteer I would suggest using that library.
Related to your issue, this error happens when the path isn't found. Can you access the file in the command line giving the same global path to the puppeteer executable? You can better debug this if you print out the path (exec_path
) just before the error. There are two cases where it can give this error, here and here.
Not sure why this gives two different errors for the same outcome, but this could be improved to be more specific.