Node.js 25.4.0 Ships with Stable require(esm)

Node.js 25.4.0 makes require(esm) stable, formalizing CommonJS and ESM compatibility across supported Node versions.

  • Sarah Gooding
3 min read
Node.js 25.4.0 Ships with Stable require(esm)

Node.js 25.4.0 marks a major milestone for the JavaScript ecosystem: require(esm) is now stable. After years of incremental work to bridge CommonJS and ECMAScript Modules, Node.js is formally declaring that transition complete.

The release does not change how require(esm) works. What it changes is how developers can rely on it. The feature has been in active use across recent Node versions, but marking it stable removes the experimental status and makes it a supported part of the runtime.

Node’s ESM story has unfolded gradually. Native ESM support arrived in 2019, but the inability to load ESM via require() left a sharp divide that forced maintainers to ship parallel builds or complex compatibility layers. That began to change in late 2024, when Node.js 22 became the first LTS release to enable require(esm) by default, followed by a substantial backport to Node.js 20 that removed the final LTS blocker for ESM-only packages.

Why It Took Years to Mark require(esm) Stable

#

In the pull request marking the feature as stable, Node.js core contributor Joyee Cheung explained that the decision reflects how widely require(esm) is already relied on in production, and how unlikely its documented behavior is to change:

This has been released to all active LTS release lines and many popular packages have been shipping ESM-only distributions based on the existence of this feature on active LTS. The current documented behaviors are unlikely to change in a breaking manner within a major release. … The stability of this feature is now not different than any other stable parts of the module loader. It’s time to mark it as stable.

In a retrospective post, Cheung said that while the initial implementation came quickly, reaching stability required sustained work across edge cases, backports, and ecosystem coordination.

"Landing an initial implementation was the easy part, but getting it to stability required a much bigger commitment dealing with interop edge cases, backports across release lines, impact investigations, seeking consensus, finding compromises, and collaboration across the ecosystem," she said.

"To be fair, some issues stemmed from workarounds the ecosystem developed for the lack of require(esm) - a bit self‑inflicted - and the cycle could’ve been broken earlier with more investment in ESM.

"But Node.js is a community project powered by volunteers: there isn’t a manager who plans top-down for everyone or assigns developers to features toward a unified vision. What gets worked on is largely a consequence of the interests and bandwidths of self-coordinated contributors who happen to be active at the time. If no one steps up to keep the ball rolling, work can stall for a long time, regardless of its impact."

With all supported Node.js versions now aligned, maintainers can rely on ESM-first workflows across Node releases. For many projects, this clears the way to simplify build pipelines and drop thin CJS wrappers.

Node.js 25.4.0 also introduces the new --require-module and --no-require-module CLI flags, promotes several previously experimental APIs to stable, and updates bundled root certificates to NSS 3.117. For an ecosystem that has spent years navigating a split module system, the stability of require(esm) is undoubtedly the release’s defining feature.

"Support from the wider community - constructive feedback, positive communication, sponsorship, or just words of encouragement - can stimulate or sustain progress, especially for a component with little love but much at stake, like the module loader," Cheung commented on the long journey for require(esm) to reach stability.

"Looking back, I’d summarize why require(esm) didn’t happen earlier simply as: it takes a village, and this time the village showed up."


Stay ahead of threats

Subscribe to our newsletter

Get notified when we publish new security blog posts!