---
title: "Discussion on \"Node.js Module System\" | Hashnode"
description: "Discussion on \"Node.js Module System\". Node.js has two module systems:\n\nCommonJS Modules:\n\nECMAScript Modules (ESM):\n\n\nCommonJS Modules:\n\nThis is the traditional module system in Node.js.\n\nFiles with .cjs extension are treated as CommonJS modules.\n\nFiles with .js extension are treated as ..."
url: "https://hashnode.com/posts/nodejs-module-system/6743d6b47fc06fd2a0b7ca1e"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Node.js Module System](https://node-module.hashnode.dev/nodejs-module-system?utm_source=hashnode&utm_medium=feed)

Node.js has two module systems: CommonJS Modules: ECMAScript Modules (ESM): CommonJS Modules: This is the traditional module system in Node.js. Files with .cjs extension are treated as CommonJS modules. Files with .js extension are treated as ...

Nov 25, 2024 · 2 min read · node-module.hashnode.dev  
Read the article

-   [#nodejs](https://hashnode.com/tag/nodejs)
-   [#module](https://hashnode.com/tag/module)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#nodejs-developer](https://hashnode.com/tag/nodejs-developer)

## Written by

[Sonu Kumar](https://hashnode.com/@shavik06212)

@shavik06212

  
[View profile](https://hashnode.com/@shavik06212)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
