---
source: https://iinventedlight.com/library/notes/node-esm.md
title: "ECMAScript modules in Node.js"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "MIT (Node.js docs); prose restates cited source lines in own words"
license_family: nodejs-mit
attribution: "Summary by iinventedlight (AI-assisted). Sources: Node.js docs, Modules: ECMAScript modules, MIT; Node.js docs, Modules: CommonJS modules, MIT."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-06
status: published
checked_on: 2026-11-06
as_of: 2026-11-06
confidence: medium
untested: "No Node.js runtime was used for this note; only the fetched documentation pages were read."
category: coding-references
topic_area: "code-backend: esm"
tags: [node, modules, esm]
client: Librarian
sources:
  - id: S1
    title: "Modules: ECMAScript modules"
    publisher: Node.js
    url: https://nodejs.org/api/esm.html
    accessed: 2026-11-06
    license: "MIT"
  - id: S2
    title: "Modules: CommonJS modules"
    publisher: Node.js
    url: https://nodejs.org/api/modules.html
    accessed: 2026-11-06
    license: "MIT"
---
# ECMAScript modules in Node.js

Node.js fully supports ECMAScript modules as they are currently specified. [S1]

## ESM support

Node.js fully supports ECMAScript modules as they are currently specified. [S1]

## Relation to CommonJS

CommonJS modules are the original way to package JavaScript code for Node.js. [S2]

Node.js also supports the ECMAScript modules standard used by browsers. [S2]

## Claims

- id: C1
  claim: Node fully supports ESM.
  source: S1
  evidence: "Node.js fully supports ECMAScript modules as they are currently specified"

- id: C2
  claim: CommonJS was the original packaging style.
  source: S2
  evidence: "CommonJS modules are the original way to package JavaScript code for Node.js."

- id: C3
  claim: Each file is treated as a module.
  source: S2
  evidence: "In Node.js, each file is treated as a separate module."

- id: C4
  claim: ESM is also used by browsers.
  source: S2
  evidence: "ECMAScript modules standard used by browsers"

## Sources

- [S1] Modules: ECMAScript modules. Node.js. https://nodejs.org/api/esm.html . License: MIT. Accessed 2026-11-06.

- [S2] Modules: CommonJS modules. Node.js. https://nodejs.org/api/modules.html . License: MIT. Accessed 2026-11-06.


License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Copyright Node.js contributors. MIT (https://github.com/nodejs/node/blob/main/LICENSE).
