Skip to content
Puppeteer · error message

Puppeteer: Could not find Chrome (ver. X). This can occur if either...

ConfigurationInstallation & launching Chrome

Last verified

The exact message
Error: Could not find Chrome (ver. 142.0.7444.59). This can occur if either 1. you did not perform an installation before running the script (e.g. `npx puppeteer browsers install chrome`) or 2. your cache path is incorrectly configured (which is: /home/user/.cache/puppeteer). For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.

What it means

Each Puppeteer release is paired with one specific Chrome for Testing build. When you install the puppeteer package, a postinstall step downloads that build into a cache, ~/.cache/puppeteer by default. At launch, Puppeteer looks for the exact version in that cache; this error means it is not there.

The message names the version it wanted and the cache directory it searched, and lists the two usual reasons. In practice the cache was either never populated (install scripts skipped, a CI cache restored without it) or was populated on a different machine or user account than the one running the script, for example building a Docker image as root and running as another user, or deploying node_modules without the home-directory cache.

What is not wrong: having Google Chrome installed does not help unless you point Puppeteer at it with executablePath or channel.

What it looks like

// .puppeteerrc.cjs
const { join } = require('path');

module.exports = {
  cacheDirectory: join(__dirname, '.cache', 'puppeteer'),
};

# then
npm install
npx puppeteer browsers install chrome

Why it happens

  • npm install ran with --ignore-scripts, or the postinstall download failed silently behind a proxy.
  • The cache lives in the build user's home directory, but the script runs as a different user or on a different machine.
  • A serverless or container deployment copied node_modules but not ~/.cache/puppeteer.
  • Puppeteer was upgraded, and the new version's Chrome build was never downloaded.
  • PUPPETEER_CACHE_DIR or a .puppeteerrc.cjs file points to a different directory at install time than at run time.

How to fix it

  1. Run the command from the message: npx puppeteer browsers install chrome.
  2. Put the cache inside the project with a .puppeteerrc.cjs that sets cacheDirectory: join(__dirname, '.cache', 'puppeteer'), then reinstall.
  3. In Docker, install and run as the same user, or set PUPPETEER_CACHE_DIR to a shared path in both stages.
  4. To use a system Chrome instead, launch with { channel: 'chrome' } or { executablePath: '/usr/bin/google-chrome' } and use puppeteer-core.
  5. Check the version you have with npx puppeteer browsers list.

How to stop it recurring

Keep the browser cache next to the code with .puppeteerrc.cjs so whatever ships node_modules ships the browser too. Run the browser install as an explicit build step rather than relying on postinstall, and pin the Puppeteer version so the expected Chrome build does not change unexpectedly between build and deploy.

Official documentation: pptr.dev/guides/configuration. See all Puppeteer error messages.

Related errors

Definitions

Quick answers

What does "Could not find Chrome (ver. X). This can occur if either..." mean in Puppeteer?

Each Puppeteer release is paired with one specific Chrome for Testing build. When you install the puppeteer package, a postinstall step downloads that build into a cache, ~/.cache/puppeteer by default. At launch, Puppeteer looks for the exact version in that cache; this error means it is not there. The message names the version it wanted and the cache directory it searched, and lists the two usual reasons.

How do I fix "Could not find Chrome (ver. X). This can occur if either..."?

1. Run the command from the message: npx puppeteer browsers install chrome. 2. Put the cache inside the project with a .puppeteerrc.cjs that sets cacheDirectory: join(__dirname, '.cache', 'puppeteer'), then reinstall. 3. In Docker, install and run as the same user, or set PUPPETEER_CACHE_DIR to a shared path in both stages. 4. To use a system Chrome instead, launch with { channel: 'chrome' } or { executablePath: '/usr/bin/google-chrome' } and use puppeteer-core. 5. Check the version you have with npx puppeteer browsers list.

Run browser automation you can watch and take over

Autonoly runs each job in a real cloud Chromium browser driven by Playwright. Timeouts and detached elements still happen; the difference is that you can watch the run live, see the step that failed, and take control of the browser to finish it.

Also see Live browser control.