From cc395cbe6ef42bfc9c73cd9cf62e3f2b5db90714 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Mon, 1 Jun 2026 16:16:13 -0700 Subject: [PATCH] docs: document install-script blocking for browser helper packages Some package managers (pnpm, Yarn Berry, Bun, Deno, and npm following RFC #868) block dependency install scripts by default. Document how to opt back in or fall back to `npx playwright install ` for the browser-downloading helper packages. Fixes: https://github.com/microsoft/playwright/issues/41083 --- docs/src/library-js.md | 4 ++++ packages/playwright-browser-chromium/README.md | 4 ++++ packages/playwright-browser-firefox/README.md | 4 ++++ packages/playwright-browser-webkit/README.md | 4 ++++ packages/playwright-chromium/README.md | 4 ++++ packages/playwright-firefox/README.md | 4 ++++ packages/playwright-webkit/README.md | 4 ++++ 7 files changed, 28 insertions(+) diff --git a/docs/src/library-js.md b/docs/src/library-js.md index 46eadfced4136..2c08cf3b8a278 100644 --- a/docs/src/library-js.md +++ b/docs/src/library-js.md @@ -206,6 +206,10 @@ Alternatively, you can add `@playwright/browser-chromium`, `@playwright/browser- npm install @playwright/browser-chromium ``` +:::note +These helper packages download the browser from an `install` script that runs during `npm install`. Some package managers (pnpm, Yarn Berry, Bun, Deno, and npm following [RFC #868](https://github.com/npm/rfcs/pull/868)) block dependency install scripts by default. In that case, allow the script explicitly (for example via the `allowScripts` field in `package.json` or `npm approve-scripts`), or download the browser with `npx playwright install chromium` instead. +::: + **Download behind a firewall or a proxy** Pass `HTTPS_PROXY` environment variable to download through a proxy. diff --git a/packages/playwright-browser-chromium/README.md b/packages/playwright-browser-chromium/README.md index 03e8c5de081bd..7adadd042a0d4 100644 --- a/packages/playwright-browser-chromium/README.md +++ b/packages/playwright-browser-chromium/README.md @@ -1,3 +1,7 @@ # @playwright/browser-chromium This package automatically installs [Chromium](https://www.chromium.org/) browser for [Playwright](http://github.com/microsoft/playwright) library. If you want to write end-to-end tests, we recommend [@playwright/test](https://playwright.dev/docs/intro). + +## Browser download and install scripts + +This package downloads the browser using an `install` script that runs during `npm install`. Some package managers (pnpm, Yarn Berry, Bun, Deno, and npm following [RFC #868](https://github.com/npm/rfcs/pull/868)) block dependency install scripts by default. If your package manager skips the script, allow it explicitly (for example via the `allowScripts` field in `package.json` or `npm approve-scripts`), or download the browser with `npx playwright install chromium` instead. diff --git a/packages/playwright-browser-firefox/README.md b/packages/playwright-browser-firefox/README.md index 38bc7cb03f743..8edb24d01fd46 100644 --- a/packages/playwright-browser-firefox/README.md +++ b/packages/playwright-browser-firefox/README.md @@ -1,3 +1,7 @@ # @playwright/browser-firefox This package automatically installs [Firefox](https://www.mozilla.org/firefox/) browser for [Playwright](http://github.com/microsoft/playwright) library. If you want to write end-to-end tests, we recommend [@playwright/test](https://playwright.dev/docs/intro). + +## Browser download and install scripts + +This package downloads the browser using an `install` script that runs during `npm install`. Some package managers (pnpm, Yarn Berry, Bun, Deno, and npm following [RFC #868](https://github.com/npm/rfcs/pull/868)) block dependency install scripts by default. If your package manager skips the script, allow it explicitly (for example via the `allowScripts` field in `package.json` or `npm approve-scripts`), or download the browser with `npx playwright install firefox` instead. diff --git a/packages/playwright-browser-webkit/README.md b/packages/playwright-browser-webkit/README.md index c8196534f46fc..ce24041c11786 100644 --- a/packages/playwright-browser-webkit/README.md +++ b/packages/playwright-browser-webkit/README.md @@ -1,3 +1,7 @@ # @playwright/browser-webkit This package automatically installs [WebKit](https://www.webkit.org/) browser for [Playwright](http://github.com/microsoft/playwright) library. If you want to write end-to-end tests, we recommend [@playwright/test](https://playwright.dev/docs/intro). + +## Browser download and install scripts + +This package downloads the browser using an `install` script that runs during `npm install`. Some package managers (pnpm, Yarn Berry, Bun, Deno, and npm following [RFC #868](https://github.com/npm/rfcs/pull/868)) block dependency install scripts by default. If your package manager skips the script, allow it explicitly (for example via the `allowScripts` field in `package.json` or `npm approve-scripts`), or download the browser with `npx playwright install webkit` instead. diff --git a/packages/playwright-chromium/README.md b/packages/playwright-chromium/README.md index af0ffa982f3f2..de210c3377953 100644 --- a/packages/playwright-chromium/README.md +++ b/packages/playwright-chromium/README.md @@ -1,3 +1,7 @@ # playwright-chromium This package contains the [Chromium](https://www.chromium.org/) flavor of the [Playwright](http://github.com/microsoft/playwright) library. If you want to write end-to-end tests, we recommend [@playwright/test](https://playwright.dev/docs/intro). + +## Browser download and install scripts + +This package downloads the browser using an `install` script that runs during `npm install`. Some package managers (pnpm, Yarn Berry, Bun, Deno, and npm following [RFC #868](https://github.com/npm/rfcs/pull/868)) block dependency install scripts by default. If your package manager skips the script, allow it explicitly (for example via the `allowScripts` field in `package.json` or `npm approve-scripts`), or download the browser with `npx playwright install chromium` instead. diff --git a/packages/playwright-firefox/README.md b/packages/playwright-firefox/README.md index f5862649fb44e..41164e4b7c1c6 100644 --- a/packages/playwright-firefox/README.md +++ b/packages/playwright-firefox/README.md @@ -1,3 +1,7 @@ # playwright-firefox This package contains the [Firefox](https://www.mozilla.org/firefox/) flavor of the [Playwright](http://github.com/microsoft/playwright) library. If you want to write end-to-end tests, we recommend [@playwright/test](https://playwright.dev/docs/intro). + +## Browser download and install scripts + +This package downloads the browser using an `install` script that runs during `npm install`. Some package managers (pnpm, Yarn Berry, Bun, Deno, and npm following [RFC #868](https://github.com/npm/rfcs/pull/868)) block dependency install scripts by default. If your package manager skips the script, allow it explicitly (for example via the `allowScripts` field in `package.json` or `npm approve-scripts`), or download the browser with `npx playwright install firefox` instead. diff --git a/packages/playwright-webkit/README.md b/packages/playwright-webkit/README.md index a5914d80168e8..afea89b7e1003 100644 --- a/packages/playwright-webkit/README.md +++ b/packages/playwright-webkit/README.md @@ -1,3 +1,7 @@ # playwright-webkit This package contains the [WebKit](https://www.webkit.org/) flavor of the [Playwright](http://github.com/microsoft/playwright) library. If you want to write end-to-end tests, we recommend [@playwright/test](https://playwright.dev/docs/intro). + +## Browser download and install scripts + +This package downloads the browser using an `install` script that runs during `npm install`. Some package managers (pnpm, Yarn Berry, Bun, Deno, and npm following [RFC #868](https://github.com/npm/rfcs/pull/868)) block dependency install scripts by default. If your package manager skips the script, allow it explicitly (for example via the `allowScripts` field in `package.json` or `npm approve-scripts`), or download the browser with `npx playwright install webkit` instead.