canirequire

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

  1. 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.
  2. TypeScript: npm install -D @types/ramda
Latest
0.32.0 (Oct 10, 2025)
Module format
Dual (CommonJS + ESM)
Last CommonJS version
0.32.0
Native ESM since
0.28.0
TypeScript types
@types/ramda
Node engines
not declared
Weekly downloads
12.1M
License
MIT

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.

Runtimerequire("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).

VersionsFormatFirst published
0.28.0 – 0.32.0Dual (CommonJS + ESM)Jan 16, 2022
0.1.0 – 0.27.2CommonJSMay 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

Similar popularity