Questions tagged [madge]

Create graphs from your CommonJS or AMD module dependencies

Create graphs from your CommonJS or AMD module dependencies. Could also be useful for finding circular dependencies in your code. Tested on Node.js and RequireJS projects. Dependencies are calculated using static code analysis. CommonJS dependencies are found using James Halliday's detective and for AMD I'm using some parts copied from James Burke's RequireJS (both are using UglifyJS). Modules written in CoffeeScript with extension .coffee are supported and will automatically be compiled on-the-fly.

MaDGe github

6 questions
8
votes
2 answers

Graphviz, gvpr is not recognized

I am trying to use MaDGe to Save dependency graph as a SVG image with CLI command madge --image graph.svg path/src/app.js but I face the error 'gvpr' is not recognized as an internal or external command this is where I have C:\Program Files…
Amir-Mousavi
  • 4,273
  • 12
  • 70
  • 123
6
votes
1 answer

Circular dependency issue while exporting from single file using babel-module-resolver

I was working on a react native project and while perfoming hot reloading app goes into cyclic recursion resulting in maximum call stack exceeded. More details of this issue can be found here From here I realised that there is something wrong and…
Harkirat Saluja
  • 7,768
  • 5
  • 47
  • 73
3
votes
2 answers

Madge skips imported typescript file

I want to print a Javascript dependency graph using madge. It prints all dependencies of a given file successfully. Unfortunately, it skips the imported .ts files and subsequently does not show them in the graph. Here is my config (.madgerc): { …
Patrick
  • 1,728
  • 2
  • 17
  • 30
1
vote
0 answers

Is There a way to get the full path of file dependencies in Madge API?

I'm using Magde API (https://github.com/pahen/madge/blob/master/README.md) to generate the dependency graph of my JS file... Once the dependencies are return as object, the file paths are not clearly documented... I was wondering if there exists a…
0
votes
1 answer

Madge and relative path not working on windows

I am trying to run the following cmd on windows 11: madge --circular src/**/**.ts I am getting this error: Error: ENOENT: no such file or directory, stat 'C:\Users\Basti\Documents\GitHub\repo\src\**\**.ts' when trying to run the command with an…
-1
votes
1 answer

How can I run madge on Windows

The instructions for madge are only good for a linux system (it requires sudo to get the command line part set up). Is there a way to run it on windows?
David Thielen
  • 28,723
  • 34
  • 119
  • 193