canirequire › Dual (CommonJS + ESM) › puppeteer
Is puppeteer ESM-only? Can you require() it?
A high-level API to control headless Chrome over the DevTools Protocol
Latest version 25.10.0, published Sep 3, 2026. JSON
Dual (CommonJS + ESM) Dual package — both require() and import work
puppeteer publishes both a CommonJS entry and a native ESM entry (ESM added in 13.3.0). require("puppeteer") and import "puppeteer" both work on every supported Node.js version and in Bun.
Does puppeteer@25.10.0 actually load? Runtime test results
Runtime probe pending for this version. The values below are what package.json declares; they are refreshed once the probe runs.
| Runtime | require("puppeteer") | import "puppeteer" |
|---|---|---|
| Node.js 18 | ✓ expected | ✓ expected |
| Node.js 20 | ✓ expected | ✓ expected |
| Node.js 22 | ✓ expected | ✓ expected |
| Node.js 24 | ✓ expected | ✓ expected |
| Node.js 26 | ✓ expected | ✓ expected |
| Bun 1.4 | pending | pending |
Install failed in our sandbox: PROBE_TIMEOUT The rows above show what package.json declares.
How to import puppeteer
ES modules (import)
import puppeteer from "puppeteer";CommonJS (require)
const puppeteer = require("puppeteer");Module format by version
Derived from the type, main and exports fields of every stable release on npm (366 versions; the newest 60 shown).
| Versions | Format | First published |
|---|---|---|
| 24.16.2 – 25.10.0 | Dual (CommonJS + ESM) | Aug 14, 2025 |
Frequently asked
Is puppeteer ESM-only?
puppeteer@25.10.0 ships CommonJS and ESM builds. puppeteer publishes both a CommonJS entry and a native ESM entry (ESM added in 13.3.0). require("puppeteer") and import "puppeteer" both work on every supported Node.js version and in Bun.
Can I require puppeteer?
Yes. puppeteer ships a CommonJS entry, so require("puppeteer") works on every Node.js version, alongside the native ESM entry for import.
Does puppeteer ship TypeScript types?
Yes. puppeteer bundles its own type declarations; no @types package is needed.
Links
Other dual (commonjs + esm) packages
- minimatch 10.2.6Dual
- brace-expansion 5.0.9Dual
- lru-cache 11.5.2Dual
- glob 13.0.6Dual
- eslint-visitor-keys 5.0.1Dual
- yallist 5.0.0Dual
- balanced-match 4.0.4Dual
- js-yaml 5.4.1Dual
Similar popularity
- yup 1.7.1CommonJS
- mysql2 3.24.4CommonJS
- class-validator 0.15.1CommonJS
- mongodb 7.6.0CommonJS
- @nestjs/common 12.0.1ESM-only
- cookie-parser 1.4.7CommonJS
- sinon 22.1.0Dual
- history 5.3.0CommonJS