From 82645e85c741dca851ee369cd26d4309d63c74b7 Mon Sep 17 00:00:00 2001 From: Christian Bromann Date: Thu, 16 Jul 2020 14:28:09 +0200 Subject: [PATCH] docs: better describe how to install Firefox Nightly with Puppeteer (#6226) Co-authored-by: Mathias Bynens --- docs/api.md | 2 +- src/node/Launcher.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api.md b/docs/api.md index bc471a0b..ec69ef1a 100644 --- a/docs/api.md +++ b/docs/api.md @@ -593,7 +593,7 @@ const browser = await puppeteer.launch({ #### puppeteer.product - returns: <[string]> returns the name of the browser that is under automation (`"chrome"` or `"firefox"`) -The product is set by the `PUPPETEER_PRODUCT` environment variable or the `product` option in [puppeteer.launch([options])](#puppeteerlaunchoptions) and defaults to `chrome`. Firefox support is experimental. +The product is set by the `PUPPETEER_PRODUCT` environment variable or the `product` option in [puppeteer.launch([options])](#puppeteerlaunchoptions) and defaults to `chrome`. Firefox support is experimental and requires to install Puppeteer via `PUPPETEER_PRODUCT=firefox npm i puppeteer`. ### class: BrowserFetcher diff --git a/src/node/Launcher.ts b/src/node/Launcher.ts index eb345388..1e0812e0 100644 --- a/src/node/Launcher.ts +++ b/src/node/Launcher.ts @@ -771,7 +771,7 @@ function resolveExecutablePath( } const revisionInfo = browserFetcher.revisionInfo(launcher._preferredRevision); const missingText = !revisionInfo.local - ? `Could not find browser revision ${launcher._preferredRevision}. Run "npm install" or "yarn install" to download a browser binary.` + ? `Could not find browser revision ${launcher._preferredRevision}. Run "PUPPETEER_PRODUCT=firefox npm install" or "PUPPETEER_PRODUCT=firefox yarn install" to download a supported Firefox browser binary.` : null; return { executablePath: revisionInfo.executablePath, missingText }; }