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: libnss3.so: 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.
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!
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:
https://docs.digitalocean.com/products/app-platform/reference/dockerfile/
Hope that this helps!
Best,
Bobby
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.
Dockerfile https://gist.github.com/BrianVia/5826f1057e2d6c07836a2c3fc5ce4104
And the app spec portion looked like this:
name: <your-service-or-app>
region: nyc
services:
- dockerfile_path: apps/<your-app>/Dockerfile
# this path is for an NX monorepo
github:
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: /
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.