Puppeteer is a powerful Node.js library that automates interactions with headless browsers like Chromium. By default, when you install Puppeteer, it downloads a specific version of Chromium to ensure compatibility. However, this can be unnecessary if you already have a working browser or want to reduce installation time, bandwidth, or storage space. In this guide, we’ll cover how to skip the default Chromium download and configure Puppeteer to use an existing browser on your machine.
Why Skip Chromium Download?
The automatic download of Chromium ensures that Puppeteer operates in a controlled and predictable environment. However, this can be overkill in some cases:
- Large Download Size: Chromium can be heavy (100+ MB), and repeatedly downloading it in different environments can waste bandwidth and storage space.
- System Compatibility: You may already have a compatible version of Chromium or Google Chrome installed on your system, making the download redundant.
- CI/CD Pipelines: In continuous integration or production environments, you may want to streamline installation times by skipping unnecessary downloads.
Now, let’s explore the steps to bypass this download.
Step 1: Set Environment Variable…
Learn more How to Skip Chromium Download in Puppeteer
