# Is bl ESM-only? Can you require() it?

> bl@7.0.12 is ESM-only. ESM-only since 7.0.0 — last CommonJS version is 6.1.6.

Buffer List: collect buffers and access with a standard readable Buffer interface, streamable too

Last verified Sep 9, 2026 against bl@7.0.12.

bl dropped its CommonJS build in 7.0.0 (April 2026). The last version with a plain require()-able CommonJS entry is 6.1.6, published Dec 4, 2025.

require("bl") failed in our probe on Node.js 20+ as well; see the runtime table for the error before relying on it. Node.js 18 has no require(esm), and bl@7.0.12 declares Node.js >=20, so 18 is outside its supported range anyway.

bl@7.0.12 declares engines ">=20", so Node.js 18 is outside its supported range regardless of module format.

## What to do

1. require("bl") failed in our probe on Node.js 20+ as well; see the runtime table for the error before relying on it.
2. From a CommonJS file, use a dynamic import inside an async function: const bl = await import("bl"). That works on every Node.js version the package supports (>=20).
3. If you need a synchronous require() or run Node.js 18: npm install bl@6.1.6, the last CommonJS release (published Dec 4, 2025).
4. bl@7.0.12 declares engines ">=20", so Node.js 18 is unsupported regardless: upgrade Node.js or pin an older release.
5. TypeScript: types are bundled; install nothing extra.

## Facts

- Latest: 7.0.12 (Jul 30, 2026)
- Module format: ESM-only
- Last CommonJS version: 6.1.6
- ESM-only since: 7.0.0 (Apr 14, 2026)
- TypeScript types: bundled
- Node engines: >=20
- Weekly downloads: 72.5M
- License: MIT

## Runtime test results for bl@7.0.12

Installed and executed on Sep 9, 2026 with require("bl") from a CommonJS file and import "bl" from an ES module.

| Runtime | require("bl") | import "bl" |
|---|---|---|
| Node.js 18 | fails (ERR_PACKAGE_PATH_NOT_EXPORTED) | works |
| Node.js 20 | fails (ERR_PACKAGE_PATH_NOT_EXPORTED) | works |
| Node.js 22 | fails (ERR_PACKAGE_PATH_NOT_EXPORTED) | works |
| Node.js 24 | fails (ERR_PACKAGE_PATH_NOT_EXPORTED) | works |
| Node.js 26 | fails (ERR_PACKAGE_PATH_NOT_EXPORTED) | works |
| Bun 1.4.0 | fails (Error) | works |

## How to import bl

ES modules:

```js
import * as bl from "bl";
```

Namespace import shown because the ESM entry may have no default export; use named imports for what it exports.

CommonJS:

```js
// require("bl") failed in our probe on Node.js 20.19+, 22.12+ and newer as well (ERR_PACKAGE_PATH_NOT_EXPORTED); see the runtime table.

// Any Node.js version the package supports (>=20), from an async function:
async function main() {
  const bl = await import("bl");
}

// Or pin the last CommonJS release:
// npm install bl@6.1.6
```

## Module format by version

Derived from the type, main and exports fields of every stable release on npm (88 versions; the newest 60 shown).

| Versions | Format | First published |
|---|---|---|
| 7.0.0 – 7.0.12 | ESM-only | Apr 14, 2026 |
| 1.2.2 – 6.1.6 | CommonJS | Mar 21, 2018 |

## Frequently asked

**Is bl ESM-only?**

bl@7.0.12 is ESM-only. bl dropped its CommonJS build in 7.0.0 (April 2026). The last version with a plain require()-able CommonJS entry is 6.1.6, published Dec 4, 2025.

**Which version of bl still supports CommonJS / require()?**

6.1.6 is the last version of bl with a CommonJS build. Install it with "npm install bl@6.1.6". Every version from 7.0.0 on is ESM-only.

**How do I use bl from a CommonJS file?**

From a CommonJS file, use a dynamic import inside an async function: const bl = await import("bl"). That works on every Node.js version the package supports (>=20). require("bl") failed in our probe on Node.js 20+ as well; see the runtime table for the error before relying on it. Alternatively pin bl@6.1.6.

**Does bl work in Bun?**

Yes. import "bl" loaded successfully in Bun 1.4.0 on Sep 9, 2026.

**Does bl ship TypeScript types?**

Yes. bl bundles its own type declarations; no @types package is needed.

## Links

- [bl on npm](https://www.npmjs.com/package/bl)
- [Source repository](https://github.com/rvagg/bl)
- [HTML version](https://canirequire.com/package/bl/)
- [JSON version](https://canirequire.com/package/bl.json)

---

For scripts and AI agents: any package is at https://canirequire.com/package/<name>/index.md (Markdown) or https://canirequire.com/package/<name>.json (JSON); the site index is https://canirequire.com/llms.txt. Fetch the URL directly; no search needed.
