# Is puppeteer ESM-only? Can you require() it?

> puppeteer@25.10.0 is ESM-only. ESM-only since 25.0.2 — last CommonJS version is 24.43.1.

A high-level API to control headless Chrome over the DevTools Protocol

Latest version 25.10.0, published Sep 3, 2026.

puppeteer dropped its CommonJS build in 25.0.2 (May 2026). The last version with a plain require()-able CommonJS entry is 24.43.1, published May 11, 2026; it declares support for Node.js >=18.

On Node.js 22.12+ and newer (puppeteer@25.10.0 declares Node.js >=22.12.0), require() of ESM packages usually works unless the package uses top-level await. Node.js 18 has no require(esm), and puppeteer@25.10.0 declares Node.js >=22.12.0, so 18 is outside its supported range anyway.

## What to do

1. On Node.js 22.12+ and newer (puppeteer@25.10.0 declares Node.js >=22.12.0), require() of ESM packages usually works unless the package uses top-level await.
2. From a CommonJS file, use a dynamic import inside an async function: const puppeteer = await import("puppeteer"). That works on every Node.js version the package supports (>=22.12.0).
3. If you need a synchronous require() or run Node.js 18: npm install puppeteer@24.43.1, the last CommonJS release (published May 11, 2026); it declares Node.js >=18.
4. TypeScript: types are bundled; install nothing extra.

## Facts

- Latest: 25.10.0 (Sep 3, 2026)
- Module format: ESM-only
- Last CommonJS version: 24.43.1
- ESM-only since: 25.0.2 (May 15, 2026)
- TypeScript types: bundled
- Node engines: >=22.12.0
- Weekly downloads: 10.4M
- License: Apache-2.0

## Runtime test results for puppeteer@25.10.0

Runtime probe pending for this version (install failed: PROBE_TIMEOUT). The facts above come from package.json.

## How to import puppeteer

ES modules:

```js
import * as puppeteer from "puppeteer";
```

Namespace import shown because the ESM entry may have no default export; use named imports for what it exports.

CommonJS:

```js
// Node.js 22.12+ and newer (unless the package uses top-level await):
const puppeteer = require("puppeteer");

// Any Node.js version the package supports (>=22.12.0), from an async function:
async function main() {
  const puppeteer = await import("puppeteer");
}

// Or pin the last CommonJS release (declares Node.js >=18):
// npm install puppeteer@24.43.1
```

## 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 |
|---|---|---|
| 25.0.2 – 25.10.0 | ESM-only | May 15, 2026 |
| 24.16.2 – 24.43.1 | Dual (CommonJS + ESM) | Aug 14, 2025 |

## Frequently asked

**Is puppeteer ESM-only?**

puppeteer@25.10.0 is ESM-only. puppeteer dropped its CommonJS build in 25.0.2 (May 2026). The last version with a plain require()-able CommonJS entry is 24.43.1, published May 11, 2026; it declares support for Node.js >=18.

**Which version of puppeteer still supports CommonJS / require()?**

24.43.1 is the last version of puppeteer with a CommonJS build; it declares Node.js >=18. Install it with "npm install puppeteer@24.43.1". Every version from 25.0.2 on is ESM-only.

**How do I use puppeteer from a CommonJS file?**

From a CommonJS file, use a dynamic import inside an async function: const puppeteer = await import("puppeteer"). That works on every Node.js version the package supports (>=22.12.0). On Node.js 22.12+ and newer (puppeteer@25.10.0 declares Node.js >=22.12.0), require() of ESM packages usually works unless the package uses top-level await. Alternatively pin puppeteer@24.43.1 (declares Node.js >=18).

**Does puppeteer ship TypeScript types?**

Yes. puppeteer bundles its own type declarations; no @types package is needed.

## Links

- [puppeteer on npm](https://www.npmjs.com/package/puppeteer)
- [Source repository](https://github.com/puppeteer/puppeteer.git#main)
- [HTML version](https://canirequire.com/package/puppeteer/)
- [JSON version](https://canirequire.com/package/puppeteer.json)

---

For scripts and AI agents: any package is at https://canirequire.com/package/<name>/index.md (Markdown) or https://canirequire.com/package/<name>.json (JSON); the site index is https://canirequire.com/llms.txt. Fetch the URL directly; no search needed.
