Puppeteer "Could not find Chromium" - Browser Not Downloaded in CI
Puppeteer looked for its Chromium build and the binary was not there. Either the download was skipped at install (an env var or puppeteer-core), or the cache directory does not match where Puppeteer searches.
What this error means
Launch fails with "Could not find Chromium (rev. NNNNNN). This can occur if either you did not perform an installation before running the script..." No browser is present to drive.
Error: Could not find Chromium (rev. 1108766). This can occur if either:
1. you did not perform an installation before running the script
(e.g. `npm install`) or
2. your cache path is incorrectly configured.Common causes
Download skipped at install
PUPPETEER_SKIP_DOWNLOAD/PUPPETEER_SKIP_CHROMIUM_DOWNLOAD was set, or puppeteer-core (which never downloads a browser) is used, so no Chromium was fetched.
Cache path mismatch
A custom PUPPETEER_CACHE_DIR at install time differs from runtime, or the CI cache was restored to a different path, so Puppeteer cannot find the build it expects.
How to fix it
Install the browser explicitly
npx puppeteer browsers install chrome
# and unset any skip-download env var in CIPin a consistent cache dir
# .npmrc or CI env
PUPPETEER_CACHE_DIR=/home/runner/.cache/puppeteerHow to prevent it
- Run
puppeteer browsers install chromeafternpm ciif downloads are skipped. - Set a stable
PUPPETEER_CACHE_DIRfor both install and run, and cache it. - Use
puppeteer(notpuppeteer-core) when you want a bundled browser.