Skip to content
Latchkey

Playwright version vs @playwright/test mismatch in CI

Each Playwright release pins a specific browser build. If playwright and @playwright/test resolve to different versions, or the cached browsers were downloaded by another version, the library looks for a revision that was never installed.

What this error means

The launch reports an "Executable doesn't exist" path with a browser revision number that does not match what npx playwright install downloaded, or a warning that the CLI and test package versions differ.

Playwright
Error: browserType.launch: Executable doesn't exist at
/root/.cache/ms-playwright/chromium-1124/chrome-linux/chrome
Note: The Playwright package version (1.44.0) does not match the installed
browsers built for an earlier version. Run 'npx playwright install'.

Common causes

playwright and @playwright/test are on different versions

A stray direct dependency on playwright pins an older version than @playwright/test, so the two disagree on which browser revision to use.

A stale browser cache from a prior version

A restored cache holds the browser build of the previous Playwright release, not the revision the upgraded library expects.

How to fix it

Align the versions and reinstall browsers

  1. Pin @playwright/test (and remove a redundant direct playwright dep, or match it).
  2. Run npx playwright install so the correct browser revision downloads.
  3. Invalidate any browser cache keyed on the old version.
Terminal
npm install -D @playwright/test@1.44.0
npx playwright install --with-deps

Key the browser cache on the Playwright version

Bake the resolved version into the cache key so an upgrade forces a fresh browser download.

.github/workflows/ci.yml
- uses: actions/cache@v4
  with:
    path: ~/.cache/ms-playwright
    key: pw-${{ hashFiles('package-lock.json') }}

How to prevent it

  • Depend on one Playwright version through @playwright/test, not both packages.
  • Run playwright install in the same step that installs the library.
  • Include the Playwright version in the browser cache key.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →