Puppeteer or Playwright in a container: Chromium fails to launch for missing libraries
@devsingh05▲ 5 net votes
Headless Chromium needs system libraries (libnss3, libatk, libgbm and others) that slim images lack, so launch fails with an error about a shared library. Use the official Playwright image or run npx playwright install --with-deps chromium in the Dockerfile; for Puppeteer, start from an image documented for it. Serverless platforms need a slim Chromium build made for them. Running as root may also require the --no-sandbox flag.