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. JSON
Dual (CommonJS + ESM) Dual package — both require() and import work
ramda publishes both a CommonJS entry and a native ESM entry (ESM added in 0.28.0). require("ramda") and import "ramda" both work on every supported Node.js version and in Bun.
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 | ✓ works | ✓ works |
How to import ramda
ES modules (import)
import ramda from "ramda";CommonJS (require)
const ramda = require("ramda");Module format by version
Derived from the type, main and exports fields of every stable release on npm (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") and import "ramda" both work on every supported Node.js version and in Bun.
Can I require ramda?
Yes. ramda ships a CommonJS entry, so require("ramda") works on every Node.js version, alongside the native ESM entry for import.
Does ramda work in Bun?
Yes. import "ramda" loaded successfully in Bun 1.4 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
- glob 13.0.6Dual
- eslint-visitor-keys 5.0.1Dual
- yallist 5.0.0Dual
- balanced-match 4.0.4Dual
- js-yaml 5.4.1Dual
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