Playwright · infra · fg-0313

Browsers installed during the Docker build are missing at runtime because the user or PLAYWRIGHT_BROWSERS_PATH changed

If you see Executable doesn't exist at /home/node/.cache/ms-playwright/chromium-1208/chrome-linux/chrome, the cause and the fix for Playwright are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
Executable doesn't exist at /home/node/.cache/ms-playwright/chromium-1208/chrome-linux/chromenpx playwright install ran as root in the build stage but the app runs as a non-root userA multi-stage build copies node_modules but not the browser cache
Cause
Browsers go to the current user's cache folder unless PLAYWRIGHT_BROWSERS_PATH is set, and the runtime looks in the same per-user default. A different user, HOME, or a missing env var at runtime points the lookup at an empty folder.
Fix
Set PLAYWRIGHT_BROWSERS_PATH to one shared folder for both the install step and the runtime, and copy that folder into the final stage. Use 0 to keep browsers inside node_modules instead. The variable does not move branded Chrome or Edge installs.
Apply
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright RUN npx playwright install --with-deps chromium && chmod -R o+rx /ms-playwright # final stage COPY --from=build /ms-playwright /ms-playwright ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
Affected
All Playwright versions in Docker, CI caches and multi-user hosts
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun