---
title: "Discussion on \"behaviour of circular dependencies in resolving node.js modules\" | Hashnode"
description: "Discussion on \"behaviour of circular dependencies in resolving node.js modules\". I was reading the Node.js design patterns book when I came across this section of cycles in module resolution. This is the sample code:\nModule a.js:\nexports.loaded = false;\nvar b = require('./b');\nmodule.exports = {\n    bWasLoaded: b.loaded,\n    load..."
url: "https://hashnode.com/posts/behaviour-of-circular-dependencies-in-resolving-nodejs-modules/666439c10bd1dd256d526e9e"
---

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

Discussion

# [behaviour of circular dependencies in resolving node.js modules](https://sparshed.hashnode.dev/behaviour-of-circular-dependencies-in-resolving-nodejs-modules?utm_source=hashnode&utm_medium=feed)

I was reading the Node.js design patterns book when I came across this section of cycles in module resolution. This is the sample code: Module a.js: exports.loaded = false; var b = require('./b'); module.exports = { bWasLoaded: b.loaded, load...

Jun 8, 2024 · 2 min read · sparshed.hashnode.dev  
Read the article

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

## Written by

[Madhuri](https://hashnode.com/@SparshX)

@SparshX · India

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

Backend developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
