Skip to content

Commit

Permalink
docs: better describe how to install Firefox Nightly with Puppeteer (#…
Browse files Browse the repository at this point in the history
…6226)

Co-authored-by: Mathias Bynens <mathias@qiwi.be>
  • Loading branch information
christian-bromann and mathiasbynens committed Jul 16, 2020
1 parent f1a6b8d commit 82645e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/api.md
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/node/Launcher.ts
Expand Up @@ -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 };
}
Expand Down

1 comment on commit 82645e8

@mathias22osterhagen22
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For Windows env with a powershell cmd I needed to proceed like this:

$env:PUPPETEER_PRODUCT = 'firefox'
npm install puppeteer

Please sign in to comment.