The Fix for require(ESM)?

Dunkelgrüner Umriss eines elektrischen Steckers und einer Steckdose, Pfeile, die die Verbindung anzeigen, vor einem hellgrünen Hintergrund.

For five years, [ERR_REQUIRE_ESM] require() of ES Module not supported was the error message we all loved to hate. Mixing CommonJS and ESM felt like hitting a brick wall, backed by the long-standing belief that they just couldn't play nice synchronously.

That barrier finally fell late last year.

Joyee Cheung challenged the status quo, dug into the core, and delivered the fix we’ve all been waiting for. Node.js now supports synchronous require(esm).

The Catch: It works for ESM graphs that do not use top-level await. Since most libraries don't use top-level await anyway, this solves the headache for almost every dependency you likely battle with.

The Fix: You don't need a hack. You just need to update your environment to one of these versions (or newer):

  • ✅ Node v20.19.0+ (LTS)
  • ✅ Node v22.12.0+ (LTS)
  • ✅ Node v24 (LTS)

The Result: Once you upgrade, require() works for standard ESM packages instantly. You can finally publish ESM-only without breaking the ecosystem or dragging legacy CJS baggage around.

Check your node -v and say goodbye to the hybrid-module chaos. 👋

Read the full story by Joyee here: 👉 From Experiment to Stability

Written by
Thilo Haas

Technology|Januar 2026

More Articles