Cache downloaded Chromium
See original GitHub issueWe are using npm ci on our CI platform to make sure we are working on a clean install. The tests running there are executed multiple times per day for multiple projects all using puppeteer.
npm ci
Description
This command is similar to npm install, except it’s meant to be used in automated environments such as test platforms, continuous integration, and deployment – or any situation where you want to make sure you’re doing a clean install of your dependencies.
The problem is that each run downloads Chromium again even if it was downloaded before already. Which will be multiple GB per day in traffic we have to pay for 😦
It would be really helpful if you could cache Chromium in NPM cache to be used for later downloads of the same file the same way as the packages itself are cached in NPM.
Steps to reproduce
Tell us about your environment:
- Puppeteer version: 7.0.1
- Platform / OS version: Mac & Linux
- URLs (if applicable): -
- Node.js version: 10.23.2
What steps will reproduce the problem?
- Add puppeteer as (dev) dependency in package.json
- npm ci
What is the expected result?
Chromium should be installed from NPM cache if already downloaded before
What happens instead?
Chromium gets downloaded each time
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)

Top Related StackOverflow Question
An update to my last comment, if you set
PUPPETEER_DOWNLOAD_PATHyou don’t need to also setPUPPETEER_EXECUTABLE_PATH. By default the code here: https://github.com/puppeteer/puppeteer/blob/bba3f41286908ced8f03faf98242d4c3359a5efc/src/node/Launcher.ts#L596 means that Puppeteer will try to find the executable in the download path.It means that solving this issue is extremely easy:
In you shell config… and that’s all 😄
Probably this should be documented in the README.
We are closing this issue. If the issue still persists in the latest version of Puppeteer, please reopen the issue and update the description. We will try our best to accomodate it!