canirequire › ESM-only › @humanfs/node
Is @humanfs/node ESM-only? Can you require() it?
The Node.js bindings of the humanfs library.
Last verified Sep 9, 2026 against @humanfs/node@0.16.8. JSON
ESM-only ESM-only — it has never shipped a CommonJS build
@humanfs/node has been ESM-only since its first stable release. There is no version you can require() on Node.js 18 or older.
require("@humanfs/node") failed in our probe on Node.js 20+ as well. See the runtime matrix below for the exact error.
Does @humanfs/node@0.16.8 actually load? Runtime test results
Installed and executed on Sep 9, 2026 with require("@humanfs/node") from a CommonJS file and import "@humanfs/node" from an ES module.
| Runtime | require("@humanfs/node") | import "@humanfs/node" |
|---|---|---|
| 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 module '@humanfs/node' from '/Users/boat/Projects/top-seo/data/probe-work/@humanfs__node/req.cjs' | ✓ works |
How to import @humanfs/node
ES modules (import)
import node from "@humanfs/node";CommonJS (require)
// Node.js 20.19+ / 22.12+ / newer (package has no top-level await):
const node = require("@humanfs/node");
// Any Node.js version:
const node = await import("@humanfs/node");Module format by version
Derived from the type, main and exports fields of every stable release on npm (19 versions; the newest 19 shown).
| Versions | Format | First published |
|---|---|---|
| 0.7.0 – 0.16.8 | ESM-only | Jan 30, 2024 |
Frequently asked
Is @humanfs/node ESM-only?
@humanfs/node@0.16.8 is ESM-only. @humanfs/node has been ESM-only since its first stable release. There is no version you can require() on Node.js 18 or older.
Which version of @humanfs/node still supports CommonJS / require()?
None. @humanfs/node has always been ESM-only. Use import, or await import("@humanfs/node") from CommonJS.
How do I use @humanfs/node from a CommonJS file?
Use a dynamic import: const mod = await import("@humanfs/node"). On Node.js 20.19+, 22.12+ and newer, a plain require("@humanfs/node") also works for ESM packages that do not use top-level await.
Does @humanfs/node work in Bun?
Yes. import "@humanfs/node" loaded successfully in Bun 1.4 on Sep 9, 2026.
Does @humanfs/node ship TypeScript types?
Yes. @humanfs/node 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
- @babel/helper-globals 8.0.0CommonJS
- @opentelemetry/semantic-conventions 1.43.0CommonJS
- @typescript-eslint/utils 8.70.0CommonJS
- @opentelemetry/resources 2.11.0CommonJS
- @img/sharp-libvips-linuxmusl-x64 1.3.3CommonJS
- @opentelemetry/instrumentation 0.222.0CommonJS
- @eslint/object-schema 3.0.5Dual
- @eslint/config-helpers 0.7.0Dual