Search across all documentation pages
9 pages in this section.
What a "module" actually is in Node, the two competing module systems (CommonJS and ES Modules), and the different categories of module you'll load - the mental model behind every other page in this section.
Explore 8 Node.js module examples, covering ESM export/import, default exports, and best practices for modern JavaScript development.
Learn how CommonJS modules work in Node.js, including module.exports, handling circular dependencies, and using __dirname workarounds.
Learn about ES Modules in Node.js, including static imports, dynamic import(), and top-level await for managing dependencies and async initialization.
Learn how package.json's "type" and "exports" fields control Node's package resolution, define entry points, and block deep imports.
Standardize Node.js modules with ESM, explicit exports, and clean package.json dependencies. Learn how to manage module systems and avoid phantom dependencies.
A single-page roundup of every highlight bullet from the 8 pages in the Modules section, grouped by source page so you can scan all 32 takeaways without opening each article individually.