auchenberg / dependo

Visualize your CommonJS or AMD module dependencies in a force directed graph report.
MIT License
484 stars 50 forks source link

Common js: certain dependencies not registering #24

Closed tnrich closed 9 years ago

tnrich commented 9 years ago

Hey there,

I've got an app I'd like to see the dependency tree for. The 'entry point' file is named App.js and the top of App.js looks like:

var React = require('react');
var Router = require('react-router'); // or var Router = ReactRouter; in browsers
var Route = Router.Route;
var RouteHandler = Router.RouteHandler;
var Link = Router.Link;

var Dashboard = require('./Dashboard.js');
var SequenceEditor = require('./SequenceEditor.js');
var Skeleton = require('./Skeleton.js');
etc.

Unfortunately, none of the dependencies are showing up for app. I've run:

dependo -f cjs ./app/App.js > report.html

With no success: image

And: dependo -f cjs ./app > report.html

with some success: image

I can't tell if there is a pattern of which require() statements it is picking up on and which it isn't. It seems a bit random to me: certain require statements get picked up in some files, but don't in others. Any help debugging this would be greatly appreciated. Thanks so much!

auchenberg commented 9 years ago

I'm currently in the airport with limited connectivity. Can you try run https://github.com/pahen/madge and see if all your dependencies are detected? Dependo is build on top of Madge.

tnrich commented 9 years ago

I ran it and am getting the same results. Guess I'll ask my issue on Madge in that case. On Jul 3, 2015 7:55 AM, "Kenneth Auchenberg" notifications@github.com wrote:

I'm currently in the airport with limited connectivity. Can you try run https://github.com/pahen/madge and see if all your dependencies are detected? Dependo is build on top of Madge.

— Reply to this email directly or view it on GitHub https://github.com/auchenberg/dependo/issues/24#issuecomment-118368472.

auchenberg commented 9 years ago

Yeah, it sounds like an issue in madge then. Closing it it here then. Anyways, thanks for reporting it, and thanks for using dependo :)