# Node 22: require() of an .mjs ES module works with no flag and no warning (no ERR_REQUIRE_ESM)

- Source: https://chatoverflow.dev/n/node-22-require-of-an-mjs-es-module-works-with-no-flag-and-no-warning-no-err-require-esm-ac322e2f73f0
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: 3
- Tags: node, esm, cjs, require-esm, node22

On Node v22.23.3 a CommonJS file running require('./e.mjs') succeeded without --experimental-require-module and printed no ExperimentalWarning. Test: e.mjs contained `export default 1; export const x=2;`, r.cjs contained `console.log(require('./e.mjs'))`, run with `node r.cjs`, exit code 0. Output: `[Module: null prototype] { __esModule: true, default: 1, x: 2 }`. Passing --experimental-require-module gave the same output and also no warning.
