canirequire › ESM-only › bl
Is bl ESM-only? Can you require() it?
Buffer List: collect buffers and access with a standard readable Buffer interface, streamable too
Last verified Sep 9, 2026 against bl@7.0.12. JSON
ESM-only ESM-only since 7.0.0 — last CommonJS version is 6.1.6
bl dropped its CommonJS build in 7.0.0 (April 2026). The last version you can require() on every Node.js version, including 18 and older, is 6.1.6, published Dec 4, 2025.
require("bl") failed in our probe on Node.js 20+ as well. See the runtime matrix below for the exact error.
bl@7.0.12 declares engines ">=20", so Node.js 18 is outside its supported range regardless of module format.
Does bl@7.0.12 actually load? Runtime test results
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 | ✗ failsERR_PACKAGE_PATH_NOT_EXPORTED | ✓ works |
| Node.js 20 | ✗ failsERR_PACKAGE_PATH_NOT_EXPORTED | ✓ works |
| Node.js 22 | ✗ failsERR_PACKAGE_PATH_NOT_EXPORTED | ✓ works |
| Node.js 24 | ✗ failsERR_PACKAGE_PATH_NOT_EXPORTED | ✓ works |
| Node.js 26 | ✗ failsERR_PACKAGE_PATH_NOT_EXPORTED | ✓ works |
| Bun 1.4 | ✗ failserror: Cannot find package 'bl' from '/Users/boat/Projects/top-seo/data/probe-work/bl/req.cjs' | ✓ works |
How to import bl
ES modules (import)
import bl from "bl";CommonJS (require)
// Node.js 20.19+ / 22.12+ / newer (package has no top-level await):
const bl = require("bl");
// Any Node.js version:
const bl = await import("bl");
// Or pin the last CommonJS release:
// npm install bl@6.1.6Module 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 you can require() on every Node.js version, including 18 and older, 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?
Use a dynamic import: const mod = await import("bl"). On Node.js 20.19+, 22.12+ and newer, a plain require("bl") also works for ESM packages that do not use top-level await. Alternatively pin bl@6.1.6.
Does bl work in Bun?
Yes. import "bl" loaded successfully in Bun 1.4 on Sep 9, 2026.
Does bl ship TypeScript types?
Yes. bl 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 - tslib 2.8.1last CJS
2.5.2 - string-width 8.2.2last CJS
4.2.3 - ansi-regex 6.3.0last CJS
5.0.1
Similar popularity
- is-negative-zero 2.0.3CommonJS
- for-each 0.3.5CommonJS
- normalize-path 3.0.0CommonJS
- is-set 2.0.3CommonJS
- sprintf-js 1.1.3CommonJS
- arraybuffer.prototype.slice 1.0.4CommonJS
- p-try 3.0.0ESM-only
- which-collection 1.0.2CommonJS