Skip to content
Latchkey

Storybook test-runner "browserType.launch: Executable doesn't exist" in CI

The Storybook test-runner drives a headless browser via Playwright. Installing the npm package does not download the browser binaries, so on a clean runner Playwright fails to launch until you run npx playwright install.

What this error means

The runner fails at launch with "browserType.launch: Executable doesn't exist at ...chromium.../chrome" and a hint to run npx playwright install.

test-runner
browserType.launch: Executable doesn't exist at
/home/runner/.cache/ms-playwright/chromium-1140/chrome-linux/chrome
Looks like Playwright was just installed or updated.
Please run the following command to download new browsers:
    npx playwright install

Common causes

Playwright browsers were never downloaded

The test-runner depends on Playwright, but the workflow installed only npm packages, not the browser binaries.

A version bump invalidated the cached browsers

Upgrading Playwright expects a new browser build that the old cache does not contain.

How to fix it

Install the Playwright browsers before testing

  1. Add a step that installs the Chromium browser (and OS deps on Linux).
  2. Run it after npm ci and before test-storybook.
  3. Re-run the job.
.github/workflows/ci.yml
- run: npm ci
- run: npx playwright install --with-deps chromium
- run: npm run test-storybook

Cache the browser binaries

Persist the Playwright cache so browsers are not re-downloaded every run, keyed on the Playwright version.

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

How to prevent it

  • Run npx playwright install --with-deps before the test-runner in CI.
  • Cache ~/.cache/ms-playwright keyed on the Playwright version.
  • Re-run install after upgrading Playwright or the test-runner.

Frequently asked questions

What causes ""browserType.launch: Executable doesn't exist""?
The test-runner depends on Playwright, but the workflow installed only npm packages, not the browser binaries.
How do I fix "browserType.launch: Executable doesn't exist"?
Install the Playwright browsers before testing

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card