canirequire › ESM-only › release-it
Is release-it ESM-only? Can you require() it?
Generic CLI tool to automate versioning and package publishing-related tasks.
Last verified Sep 9, 2026 against release-it@21.0.2. Markdown · JSON
ESM-only ESM-only since 15.0.0 — last CommonJS version is 14.14.3
release-it dropped its CommonJS build in 15.0.0 (April 2022). The last version with a plain require()-able CommonJS entry is 14.14.3, published Apr 29, 2022; it declares support for Node.js >=10.
On Node.js 22.12+ and newer (release-it@21.0.2 declares Node.js ^22.21.0 || >=24.0.0), require("release-it") works with the latest version: Node.js loads synchronous ES modules through require(). Verified on Node.js 22, 24 and 26. Node.js 18 has no require(esm), and release-it@21.0.2 declares Node.js ^22.21.0 || >=24.0.0, so 18 is outside its supported range anyway.
release-it@21.0.2 declares engines "^22.21.0 || >=24.0.0", so Node.js 18, 20 are outside its supported range regardless of module format.
What to do
- On Node.js 22.12+ and newer (release-it@21.0.2 declares Node.js ^22.21.0 || >=24.0.0), require("release-it") works with the latest version: Node.js loads synchronous ES modules through require(). Verified on Node.js 22, 24 and 26.
- From a CommonJS file, use a dynamic import inside an async function: const releaseIt = await import("release-it"). That works on every Node.js version the package supports (^22.21.0 || >=24.0.0).
- If you need a synchronous require() or run Node.js 18: npm install release-it@14.14.3, the last CommonJS release (published Apr 29, 2022); it declares Node.js >=10.
- release-it@21.0.2 declares engines "^22.21.0 || >=24.0.0", so Node.js 18, 20 are unsupported regardless: upgrade Node.js or pin an older release.
- TypeScript: types are bundled; install nothing extra.
Does release-it@21.0.2 actually load? Runtime test results
Installed and executed on Sep 9, 2026 with require("release-it") from a CommonJS file and import "release-it" from an ES module.
| Runtime | require("release-it") | import "release-it" |
|---|---|---|
| Node.js 18 | ✗ failsERR_REQUIRE_ESM | ✗ failsSyntaxError |
| Node.js 20 | ✓ works | ✓ works |
| Node.js 22 | ✓ works | ✓ works |
| Node.js 24 | ✓ works | ✓ works |
| Node.js 26 | ✓ works | ✓ works |
| Bun 1.4.0 | ✓ works | ✓ works |
How to import release-it
ES modules (import)
import * as releaseIt from "release-it";Namespace import shown because the ESM entry may have no default export; use named imports for what it exports.
CommonJS (require)
// Node.js 22.12+ and newer (verified):
const releaseIt = require("release-it");
// Any Node.js version the package supports (^22.21.0 || >=24.0.0), from an async function:
async function main() {
const releaseIt = await import("release-it");
}
// Or pin the last CommonJS release (declares Node.js >=10):
// npm install release-it@14.14.3Module format by version
Derived from the type, main and exports fields of every stable release on npm, corrected where a runtime test of that version contradicted them (345 versions; the newest 60 shown).
| Versions | Format | First published |
|---|---|---|
| 15.10.5 – 21.0.2 | ESM-only | Jun 2, 2023 |
Frequently asked
Is release-it ESM-only?
release-it@21.0.2 is ESM-only. release-it dropped its CommonJS build in 15.0.0 (April 2022). The last version with a plain require()-able CommonJS entry is 14.14.3, published Apr 29, 2022; it declares support for Node.js >=10.
Which version of release-it still supports CommonJS / require()?
14.14.3 is the last version of release-it with a CommonJS build; it declares Node.js >=10. Install it with "npm install release-it@14.14.3". Every version from 15.0.0 on is ESM-only.
How do I use release-it from a CommonJS file?
From a CommonJS file, use a dynamic import inside an async function: const releaseIt = await import("release-it"). That works on every Node.js version the package supports (^22.21.0 || >=24.0.0). On Node.js 22.12+ and newer (release-it@21.0.2 declares Node.js ^22.21.0 || >=24.0.0), require("release-it") works with the latest version: Node.js loads synchronous ES modules through require(). Verified on Node.js 22, 24 and 26. Alternatively pin release-it@14.14.3 (declares Node.js >=10).
Does release-it work in Bun?
Yes. import "release-it" loaded successfully in Bun 1.4.0 on Sep 9, 2026.
Does release-it ship TypeScript types?
Yes. release-it bundles its own type declarations; no @types package is needed.
Links
Other 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
Similar popularity
- jasmine-spec-reporter 7.0.0CommonJS
- eslint-plugin-standard 5.0.0CommonJS
- @material-ui/core 4.12.4CommonJS
- eslint-plugin-html 8.2.0CommonJS
- babel-plugin-transform-class-properties 6.24.1CommonJS
- eslint-import-resolver-webpack 0.13.11CommonJS
- styled-system 5.1.5CommonJS
- prettier-eslint 17.1.2ESM-only