canirequire

Is it ESM-only? Can I still require() it?

Module format, the last CommonJS version, TypeScript types, and real require() / import test results on Node.js 18, 20, 22, 24, 26 and Bun, for the 1710 most-used npm packages.

341ESM-only
304dual CJS + ESM
1034CommonJS
31no JS entry

Recently went ESM-only

All 341 ESM-only packages →

Most-downloaded ESM-only packages

Why this exists

The classic symptom is Error [ERR_REQUIRE_ESM]: require() of ES Module not supported after a routine upgrade. The fix is usually one of three things: pin the last CommonJS release, switch to await import(), or move to Node.js 20.19+ / 22.12+ where require() can load most ES modules. This site tells you which version to pin and whether the modern require() path actually works for that package. Read how the data is produced.

Not the Auth0 tool

canirequire.com is an independent project with no affiliation to Auth0. It is unrelated to Auth0's "Can I require?" tool, which lists the modules available inside Auth0 Actions and Webtask; if that is what you were looking for, it lives at auth0-extensions.github.io/canirequire. This site answers a different question: whether an npm package is ESM-only and which version still works with require() in Node.js.

Use from scripts and AI agents

Every page can be fetched directly; no search step is needed.

A 404 means the package is not in the dataset (the 1710 most-used packages). In that case read its package.json from https://registry.npmjs.org/<name>/latest: a require condition in exports, or no "type": "module", means it can be required.

curl -s https://canirequire.com/package/chalk/index.md
curl -s https://canirequire.com/package/chalk.json | jq .nextSteps