canirequire

canirequireDual (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.

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✓ 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).

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") 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

Similar popularity