canirequire

canirequireDual (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.

Latest
25.10.0 (Sep 3, 2026)
Module format
Dual (CommonJS + ESM)
Last CommonJS version
25.10.0
Native ESM since
13.3.0
TypeScript types
Bundled
Node engines
>=22.12.0
Weekly downloads
10.4M
License
Apache-2.0

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.

Runtimerequire("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.4pendingpending

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).

VersionsFormatFirst published
24.16.2 – 25.10.0Dual (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

Similar popularity