Puppeteer provides two distinct packages depending on your use case:
puppeteer (The Product)
Use this for standard browser automation. It is a high-level package that automatically downloads a compatible version of Chrome and provides reasonable defaults for automation workflows.
puppeteer-core (The Library)
Use this if you want to manage browsers yourself or connect to a remote browser. It is a lightweight library that does not download Chrome.
When to use puppeteer-core:
- Connecting to a remote browser via
puppeteer.connect. - Managing your own browser instances.
- When using an existing browser installation.
Note: If you use puppeteer-core, you must provide an executablePath or channel to puppeteer.launch, and you must change your import statement.
import puppeteer from 'puppeteer-core';