canirequire › Dual (CommonJS + ESM) › ramda
Is ramda ESM-only? Can you require() it?
A practical functional library for JavaScript programmers.
Last verified Sep 9, 2026 against ramda@0.32.0. Markdown · JSON
Dual (CommonJS + ESM) Dual package — require() works on every Node.js version we test; import works too
ramda publishes both a CommonJS entry and a native ESM entry (ESM added in 0.28.0). require("ramda") works on every Node.js version we test (18, 20, 22, 24 and 26) and in Bun. import "ramda" works alongside it.
What to do
- Nothing to change. require("ramda") works on every Node.js version we test (18, 20, 22, 24 and 26) and in Bun. import * as ramda from "ramda" works alongside it; use named imports for what the ESM entry exports.
- TypeScript: npm install -D @types/ramda
Does ramda@0.32.0 actually load? Runtime test results
Installed and executed on Sep 9, 2026 with require("ramda") from a CommonJS file and import "ramda" from an ES module.
| Runtime | require("ramda") | import "ramda" |
|---|---|---|
| Node.js 18 | ✓ works | ✓ works |
| 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 ramda
ES modules (import)
import * as ramda from "ramda";Namespace import shown because the ESM entry may have no default export; use named imports for what it exports.
CommonJS (require)
const ramda = require("ramda");Module 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 (60 versions; the newest 60 shown).
| Versions | Format | First published |
|---|---|---|
| 0.28.0 – 0.32.0 | Dual (CommonJS + ESM) | Jan 16, 2022 |
| 0.1.0 – 0.27.2 | CommonJS | May 16, 2014 |
Frequently asked
Is ramda ESM-only?
ramda@0.32.0 ships CommonJS and ESM builds. ramda publishes both a CommonJS entry and a native ESM entry (ESM added in 0.28.0). require("ramda") works on every Node.js version we test (18, 20, 22, 24 and 26) and in Bun. import "ramda" works alongside it.
Can I require ramda?
Yes. ramda ships a CommonJS entry alongside the native ESM entry. require("ramda") works on every Node.js version we test (18, 20, 22, 24 and 26) and in Bun.
Does ramda work in Bun?
Yes. import "ramda" loaded successfully in Bun 1.4.0 on Sep 9, 2026.
Does ramda ship TypeScript types?
Not bundled. Install the community types with "npm install -D @types/ramda".
Links
Other dual (commonjs + esm) packages
- minimatch 10.2.6Dual
- brace-expansion 5.0.9Dual
- lru-cache 11.5.2Dual
- tslib 2.8.1Dual
- glob 13.0.6Dual
- eslint-visitor-keys 5.0.1Dual
- yallist 5.0.0Dual
- balanced-match 4.0.4Dual
Similar popularity
- portfinder 1.0.38CommonJS
- request 2.88.2CommonJS
- postcss-calc 11.1.1ESM-only
- nodemon 3.1.14CommonJS
- redis 6.2.1CommonJS
- q 1.5.1CommonJS
- react-native 0.87.1CommonJS
- jquery 4.0.0ESM-only