Question

Puppeteer on App Platform

The build step for my static site includes a library which uses Puppeteer to catalog the SPA routes and generate static files for each route.

During deployment this build step fails while trying to run Puppeteer and I get the following error:

[2021-06-14T08:01:57.308144976Z] /workspace/node_modules/puppeteer/.local-chromium/linux-686378/chrome-linux/chrome: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory

Is there a way to install system level dependencies on the app platform?


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hey @rehandalal,

You won’t be able to launch puppeteer using buildpacks. You might consider deploying the app using Dockerfile where apt install will work. However, I have not installed Puppeteer myself using Dockerfile so I would recommend you to refer to the articles or posts available on Google such as below: https://github.com/buildkite/docker-puppeteer https://hub.docker.com/r/buildkite/puppeteer/ https://hub.docker.com/r/buildkite/puppeteer/dockerfile https://paul.kinlan.me/hosting-puppeteer-in-a-docker-container/

It is always convenient to run such apps in Droplets because you have root permissions to run and execute such commands. Additionally, you can customise the underlying infrastructure as per your needs. However, if you are considering running this in App Platform and come across any error, then please don’t hesitate to reach out to our support team.

Cheers, Taha Fatima