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.
Recently went ESM-only
- three 0.186.0last CJS
0.185.1 - mocha 12.0.0last CJS
11.8.0 - cssnano 9.0.4last CJS
8.0.10 - @nestjs/core 12.0.1last CJS
11.2.3 - @nestjs/common 12.0.1last CJS
11.2.3 - @nestjs/testing 12.0.1last CJS
11.2.3 - content-type 3.0.0last CJS
2.1.0 - postcss-calc 11.1.1last CJS
10.1.1 - content-disposition 3.0.0last CJS
2.0.1 - @changesets/cli 3.0.2last CJS
2.31.1 - ember-source 7.2.0last CJS
7.1.0 - eslint-plugin-jsdoc 64.3.8last CJS
63.3.3
Most-downloaded ESM-only packages
- ansi-styles 7.0.0last CJS
5.2.0 - strip-ansi 7.2.0last CJS
6.0.1 - commander 15.0.0last CJS
14.0.3 - supports-color 11.0.0last CJS
8.1.1 - chalk 6.0.0last CJS
4.1.2 - string-width 8.2.2last CJS
4.2.3 - ansi-regex 6.3.0last CJS
5.0.1 - escape-string-regexp 5.0.0last CJS
4.0.0 - wrap-ansi 10.0.1last CJS
7.0.0 - color-name 2.1.1last CJS
1.1.4 - color-convert 3.1.3last CJS
2.0.1 - p-limit 7.3.2last CJS
3.1.0
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.
- Package as Markdown:
https://canirequire.com/package/<name>/index.md(short form/package/<name>.mdalso works; scoped packages keep the slash:/package/@babel/core/index.md) - Package as JSON:
https://canirequire.com/package/<name>.json, including anextStepsarray and the runtime matrix.formatis one ofesm-only,dual,cjs,none;runtimeis always an object (runtime.nodeis empty when the install failed) - All packages in one request: /search-index.json, an array of
[name, format, lastCommonJsVersion, latestVersion] - Lists as Markdown: /esm-only/index.md, /dual/index.md, /commonjs/index.md, /no-entry/index.md
- Site map for agents: /llms.txt
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