
( git-vfs, git-run-command-patch-git, git-git) (make) ( busking-git, linopen, xdg-utils-slock, xdg-utils-symlink-fix, xdg-utils-lxqt, mimi-bachoseven-git, mimi, mimi-git, xdg-utils-handlr, xdg-utils-mimeo, opener, mimejs-git, xdg-utils-betterlockscreen) ( pipewire-full-git, pipewire-common-git, pipewire-git) ( libva-minimal-git, intel-media-stack-bin, libva-git, libva-headless) Setting it to pw:browser* is helpful while debugging Error: Failed to launch browser errors.( libpulse-bluedio, pulseaudio-pali, pulseaudio-dummy, libpulse-nosystemd-git, libpulse-nosystemd, libpulse-nosystemd-minimal-git, libpulse-airplay, pulseaudio-git) Playwright supports the DEBUG environment variable to output debug logs during execution. To cache the browser downloads between CI runs, cache this location in your CI configuration, against a hash of the Playwright version.
~/Library/Caches/ms-playwright on MacOS. %USERPROFILE%\AppData\Local\ms-playwright on Windows. With the default behavior, Playwright downloads the browser binaries in the following directories: Cache the browser binaries, with the steps below. Use npm ci (instead of npm install) which forces a clean install: by removing the existing node_modules directory. This will download the browser binaries in the node_modules directory and cache them with the package code. Set PLAYWRIGHT_BROWSERS_PATH=0 as the environment variable before running npm install. (This is the default behavior in most CI providers.) Move to caching $HOME/.npm or the npm-cache directory. This behavior can be fixed with one of the following approaches: Travis CI automatically caches node_modules if your repo does not have a package-lock.json file. This is because the npm install step will find the Playwright NPM package on disk and not execute the postinstall step. If your CI pipelines caches the node_modules directory and you run npm install (instead of npm ci), the default configuration Most CI providers cache the npm-cache directory (located at $HOME/.npm). Exception: node_modules are cached (Node-specific) This behavior can be customized with environment variables.Ĭaching browsers on CI is strictly optional: The postinstall hooks should execute and download the browser binaries on every run. The NPM packages have a postinstall hook that downloads the browser binaries.
By default, Playwright downloads browser binaries when the Playwright NPM package is installed.