https://github.com/capaj/require-logger
tiny utility to help when debugging cyclic dependency issues in node.js
https://github.com/capaj/require-logger
Last synced: over 1 year ago
JSON representation
tiny utility to help when debugging cyclic dependency issues in node.js
- Host: GitHub
- URL: https://github.com/capaj/require-logger
- Owner: capaj
- License: mit
- Created: 2019-03-08T14:16:13.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-11T00:40:20.000Z (over 7 years ago)
- Last Synced: 2024-04-09T21:10:35.616Z (about 2 years ago)
- Language: JavaScript
- Size: 10.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# require-logger
tiny utility to visualize whole dependency tree and possibly help with debugging cyclic dependency issues in node.js
## Install
```
npm i require-logger -g
```
I found that I need this module when debugging circular dependencies. Since other developers on your team might have different tools for this it's probably best to install as global dep.
## Usage
Just require or import at the root file of your app.
```js
require('require-logger')
```
next time you run your app, you should see a tree of dependencies as they are loaded in the STDOUT.
`node_modules` folder deps are skipped. Only local files are shown.
In the tree it's easy to spot cyclic deps and also parent modules which can be broken into multiple modules.