Can't locate chromium directory for puppeteer on Digital Ocean App Platform.

Hi, I’m getting this error when I want to run puppeteer on digital ocean app platform.

Error: Failed to launch the browser process!
/workspace/node_modules/puppeteer/.local-chromium/linux-1022525/chrome-linux/chrome: error while loading shared libraries: cannot open shared object file: No such file or directory

From what I’ve heard, the solution seems to be to install the missing dependencies by running sudo apt-get install, but I can’t do that on the app platform.

Does anyone know how to solve this? Thanks.

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.

Hey OP or anyone else who finds this, I’ve written a NodeJS version of the Dockerfile that (it appears) has accomplished what you and I both needed.


And the app spec portion looked like this:

name: <your-service-or-app>
region: nyc
- dockerfile_path: apps/<your-app>/Dockerfile
  # this path is for an NX monorepo
    branch: main
    deploy_on_push: true
    repo: GithubUserName/repo-name
  http_port: 8080
  instance_count: 2
  instance_size_slug: professional-xs
  name: projects
  source_dir: /
Bobby Iliev
Site Moderator
Site Moderator badge
January 25, 2023

Hi there,

Indeed with the App Platform you can not install packages directly.

What you could do instead is to use a Dockerfile and specify all of the packages and dependencies that you need in there and deploy your app that way:

Hope that this helps!



Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel
Get started for free

Enter your email to get $200 in credit for your first 60 days with DigitalOcean.

New accounts only. By submitting your email you agree to our Privacy Policy.

© 2023 DigitalOcean, LLC.