Skip to content

fix(install): auto-install Playwright Chromium + friendlier missing-browser error#107

Merged
JonasJesus42 merged 1 commit into
mainfrom
fix/playwright-postinstall
Jun 17, 2026
Merged

fix(install): auto-install Playwright Chromium + friendlier missing-browser error#107
JonasJesus42 merged 1 commit into
mainfrom
fix/playwright-postinstall

Conversation

@JonasJesus42

@JonasJesus42 JonasJesus42 commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

User report after npm install -g @decocms/parity@latest: parity run failed with browserType.launch: Executable doesn't exist + Playwright's ASCII banner.

Two fixes:

  1. postinstall script runs npx playwright install chromium automatically. Skippable via PARITY_SKIP_PLAYWRIGHT_INSTALL=1. Failures downgrade to warning.
  2. launchBrowser catches the missing-browser error and throws a single clear instruction instead of Playwright's banner/stack.

Bumps 0.11.7.


Summary by cubic

Automatically installs Playwright Chromium during @decocms/parity install. Replaces the "Executable doesn't exist" crash with a clear instruction to fix first-run failures after a fresh global install.

  • Bug Fixes
    • Added postinstall script to run npx playwright install chromium once; skip with PARITY_SKIP_PLAYWRIGHT_INSTALL=1. Failures log a warning so install still completes.
    • launchBrowser now catches the missing-browser error and shows a single instruction (npx playwright install chromium), preserving the original error on cause.
    • Updated README and bumped to 0.11.7.

Written for commit 7fe2f0f. Summary will update on new commits.

Review in cubic

…rowser error

User report: a fresh `npm install -g @decocms/parity` followed by
`parity run` failed with `browserType.launch: Executable doesn't exist
at .../chrome-headless-shell` plus Playwright's ASCII banner. Two fixes:

1. **postinstall script** runs `npx playwright install chromium`
   automatically after install (one-time, ~140 MB). Skippable via
   `PARITY_SKIP_PLAYWRIGHT_INSTALL=1` for CI / Docker / monorepos that
   manage browsers separately. Failures (offline, corp proxy) downgrade
   to a warning so the global install itself still completes.

2. **launchBrowser catches the missing-browser error** and throws a new
   Error with a single clear instruction (`npx playwright install
   chromium`) instead of letting Playwright's stack trace + banner reach
   the user. Original error preserved on `.cause`.

Also documented the known cosmetic peer-dep warning for zod (SDK wants
zod 4, parity uses zod 3 — they coexist via npm nesting, harmless).

Bumps 0.11.7.
@JonasJesus42 JonasJesus42 merged commit 0aa8d86 into main Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant