puppeteer-heroku-buildpack: Fails to launch puppeteer due to missing package

Hey!

I’ve added the buildpack to my Heroku application and deployed it. However, when the app tries to launch puppeteer, it gives the following error:

Error: Failed to launch chrome! /app/node_modules/puppeteer/.local-chromium/linux-515411/chrome-linux/chrome: error while loading shared libraries: libcairo-gobject.so.2: cannot open shared object file: No such file or directory

Do you have any idea what the problem could be?

Thanks.

EDIT: #6 Submitted a pull request to fix the issue

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 16 (9 by maintainers)

Most upvoted comments

Run it locally instead of on heroku. Then once you have your scripts set up you can run it headless on heroku if you need. This buildpack is for getting puppeteer running on heroku, so if you have further questions about how to use puppeteer or about running it with a GUI locally, you might be better off asking on the puppetter repo or in their forums.

Hey @voduycan. Heroku doesn’t have a GUI, and so running puppeteer in headless: false mode won’t work. You can still do all the same things when running in headless mode on heroku, but you won’t be able to inspect it visually. Screenshots are a good way to see what puppeteer is doing at any point in time though.