# canirequire > Per-package answers to "Is this npm package ESM-only? Which version can I still require()?" for the 1710 most-used npm packages, verified by installing each one and running require() and import on Node.js 18, 20, 22, 24, 26 and Bun. Each package page states the module format (one of exactly four values in the JSON "format" field: "esm-only", "dual", "cjs", or "none" for packages with no loadable JavaScript entry such as CLIs, type-only packages and stylesheets), the first ESM-only version, the last version with a CommonJS build, whether TypeScript types are bundled, the Node.js engines range, and a runtime matrix of require()/import results per Node.js major and Bun. Data comes from the npm registry plus real execution; every page shows the date it was verified. To answer a question about a package, fetch its markdown page directly; no search step is needed. Every page has a markdown version at the same URL with index.md appended, and every package also has a JSON version with a nextSteps array: - Markdown: https://canirequire.com/package//index.md, or the short form https://canirequire.com/package/.md (scoped packages keep the slash, e.g. https://canirequire.com/package/@babel/core/index.md) - JSON: https://canirequire.com/package/.json - HTML: https://canirequire.com/package// - Not in the dataset (404): read https://registry.npmjs.org//latest and check the exports/type fields, as explained on the methodology page Response content types: markdown pages are text/markdown, JSON is application/json, HTML pages are text/html, and this file is text/plain. A 404 keeps the format of the URL that was asked for (markdown body for .md, JSON body for .json, HTML otherwise) and its body carries the recovery steps above, plus a pointer to https://canirequire.com/search-index.json for near matches. canirequire.com is an independent project, not affiliated with Auth0 and unrelated to Auth0's "Can I require?" tool (the list of modules available inside Auth0 Actions and Webtask). Terms used on every page: - "ESM-only" means the latest version has no CommonJS entry. On Node.js 18 and older, require() of it fails with ERR_REQUIRE_ESM. - Node.js 20.19+, 22.12+ and newer can require() ESM packages unless they use top-level await (ERR_REQUIRE_ASYNC_MODULE). The per-package runtime matrix shows which case applies. - The "last CommonJS version" is the newest stable release that still shipped a CommonJS entry; pin it with npm install @ if you cannot move to ESM. - "none" means the package has no JavaScript entry point at all (the runtime probe confirmed neither require() nor import loads anything). The ESM question does not apply; skip these explicitly in a migration audit. - In the package JSON, "runtime" is always an object: "runtime.installed" says whether the probe could install the package; when it could not, "runtime.node" is {} and "runtime.bun" is null, and "runtime.installError" holds the reason. ## Package lists - [ESM-only packages](https://canirequire.com/esm-only/index.md): 341 packages that dropped CommonJS, each with the version that went ESM-only and the last version that still works with require() - [Dual CommonJS + ESM packages](https://canirequire.com/dual/index.md): 304 packages where both require() and import work - [CommonJS packages](https://canirequire.com/commonjs/index.md): 1034 packages that ship CommonJS only - [Packages with no JavaScript entry](https://canirequire.com/no-entry/index.md): 31 packages (CLIs, types, stylesheets, data) where require() and import do not apply; the four lists together cover all 1710 packages ## Methodology - [How the data is produced](https://canirequire.com/about/index.md): how formats are classified from package.json, how the runtime probes work, and why require() of ESM depends on the Node.js version ## Most-used ESM-only packages - [ansi-styles](https://canirequire.com/package/ansi-styles/index.md): ESM-only since 6.0.0, last CommonJS version 5.2.0 - [strip-ansi](https://canirequire.com/package/strip-ansi/index.md): ESM-only since 7.0.0, last CommonJS version 6.0.1 - [commander](https://canirequire.com/package/commander/index.md): ESM-only since 15.0.0, last CommonJS version 14.0.3 - [supports-color](https://canirequire.com/package/supports-color/index.md): ESM-only since 9.0.0, last CommonJS version 8.1.1 - [chalk](https://canirequire.com/package/chalk/index.md): ESM-only since 5.0.0, last CommonJS version 4.1.2 - [string-width](https://canirequire.com/package/string-width/index.md): ESM-only since 5.0.0, last CommonJS version 4.2.3 - [ansi-regex](https://canirequire.com/package/ansi-regex/index.md): ESM-only since 6.0.0, last CommonJS version 5.0.1 - [escape-string-regexp](https://canirequire.com/package/escape-string-regexp/index.md): ESM-only since 5.0.0, last CommonJS version 4.0.0 - [wrap-ansi](https://canirequire.com/package/wrap-ansi/index.md): ESM-only since 8.0.0, last CommonJS version 7.0.0 - [color-name](https://canirequire.com/package/color-name/index.md): ESM-only since 2.0.0, last CommonJS version 1.1.4 - [color-convert](https://canirequire.com/package/color-convert/index.md): ESM-only since 3.0.0, last CommonJS version 2.0.1 - [p-limit](https://canirequire.com/package/p-limit/index.md): ESM-only since 4.0.0, last CommonJS version 3.1.0 - [uuid](https://canirequire.com/package/uuid/index.md): ESM-only since 12.0.0, last CommonJS version 11.1.1 - [path-key](https://canirequire.com/package/path-key/index.md): ESM-only since 4.0.0, last CommonJS version 3.1.1 - [is-fullwidth-code-point](https://canirequire.com/package/is-fullwidth-code-point/index.md): ESM-only since 4.0.0, last CommonJS version 3.0.0 - [yargs](https://canirequire.com/package/yargs/index.md): ESM-only since 18.0.0, last CommonJS version 17.7.3 - [https-proxy-agent](https://canirequire.com/package/https-proxy-agent/index.md): ESM-only since 8.0.0, last CommonJS version 7.0.6 - [js-tokens](https://canirequire.com/package/js-tokens/index.md): ESM-only since 10.0.0, last CommonJS version 9.0.1 - [@babel/code-frame](https://canirequire.com/package/@babel/code-frame/index.md): ESM-only since 8.0.0, last CommonJS version 7.29.7 - [locate-path](https://canirequire.com/package/locate-path/index.md): ESM-only since 7.0.0, last CommonJS version 6.0.0 - [p-locate](https://canirequire.com/package/p-locate/index.md): ESM-only since 6.0.0, last CommonJS version 5.0.0 - [@babel/types](https://canirequire.com/package/@babel/types/index.md): ESM-only since 8.0.0, last CommonJS version 7.29.8 - [nanoid](https://canirequire.com/package/nanoid/index.md): ESM-only since 4.0.0, last CommonJS version 3.3.18 - [cliui](https://canirequire.com/package/cliui/index.md): ESM-only since 9.0.0, last CommonJS version 8.0.1 - [@babel/parser](https://canirequire.com/package/@babel/parser/index.md): ESM-only since 8.0.0, last CommonJS version 7.29.8 ## Optional - [search-index.json](https://canirequire.com/search-index.json): array of [name, format, lastCommonJsVersion, latestVersion] for every package - [Sitemap](https://canirequire.com/sitemap-index.xml): every HTML page - [Home page](https://canirequire.com/): search box and the same lists in HTML