Skip to content

Commit

Permalink
docs: add download location to the FAQ (#7339)
Browse files Browse the repository at this point in the history
Co-authored-by: Mathias Bynens <mathias@qiwi.be>
  • Loading branch information
dfernandez79 and mathiasbynens committed Jun 21, 2021
1 parent bba3f41 commit 7e74a9d
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion README.md
Expand Up @@ -41,7 +41,7 @@ npm i puppeteer
# or "yarn add puppeteer"
```

Note: When you install Puppeteer, it downloads a recent version of Chromium (~170MB Mac, ~282MB Linux, ~280MB Win) that is guaranteed to work with the API. To skip the download, or to download a different browser, see [Environment variables](https://github.com/puppeteer/puppeteer/blob/v10.0.0/docs/api.md#environment-variables).
Note: When you install Puppeteer, it downloads a recent version of Chromium (~170MB Mac, ~282MB Linux, ~280MB Win) that is guaranteed to work with the API. To skip the download, download into another path, or download a different browser, see [Environment variables](https://github.com/puppeteer/puppeteer/blob/v10.0.0/docs/api.md#environment-variables).

### puppeteer-core

Expand Down Expand Up @@ -440,6 +440,27 @@ You may find that Puppeteer does not behave as expected when controlling pages t

We have a [troubleshooting](https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md) guide for various operating systems that lists the required dependencies.

#### Q: Chromium gets downloaded on every `npm ci` run. How can I cache the download?

The default download path is `node_modules/puppeteer/.local-chromium`. However, you can change that path with the `PUPPETTER_DOWNLOAD_PATH` environment variable.

Puppeteer uses that variable to resolve the Chromium executable location during launch, so you don’t need to specify `PUPPETEER_EXECUTABLE_PATH` as well.

For example, if you wish to keep the Chromium download in `~/.npm/chromium`:

```sh
export PUPPETEER_DOWNLOAD_PATH=~/.npm/chromium
npm ci

# by default the Chromium executable path is inferred
# from the download path
npm test

# a new run of npm ci will check for the existence of
# Chromium in ~/.npm/chromium
npm ci
```

#### Q: How do I try/test a prerelease version of Puppeteer?

You can check out this repo or install the latest prerelease from npm:
Expand Down

0 comments on commit 7e74a9d

Please sign in to comment.