Comments (17)
I'm using this style myself in a project and it seems to work pretty well for me. Can you give me a more detailed example so I can try to reproduce it?
from madge.
Well, then....it's highly likely I just have no idea what I'm doing 😄 Here's a link to the code I was trying to generate a graph of: https://github.com/EisenbergEffect/Durandal/tree/master/app/durandal
Let me know if I can help any other way. Thanks!
from madge.
Hehe, I'm sure you know what you're doing :) I tried running madge on your project and it seems to be working as expected for me. Am I missing something in your code?
$ madge -f amd -i graph.png app/durandal
http://cl.ly/image/1P1K2Y1e2O0x
$ madge -f amd app/durandal
app
composition
dom
events
messageBox
modalDialog
system
viewEngine
widget
composition
system
viewEngine
viewLocator
viewModelBinder
dom
system
events
system
http
messageBox
modalDialog
composition
system
viewModel
system
viewEngine
dom
text
viewLocator
system
viewEngine
viewModel
system
viewModelBinder
system
widget
composition
system
from madge.
Well, would you look at that!? It works! I think I must have been using the command incorrectly. I'll give it a try myself and see what happens.
from madge.
Ok. I tried it on my machine and I get something different:
app
composition
dom
events
messageBox
modalDialog
system
viewEngine
widget
It's like it's only tracing the app module and not the other modules. I'm running this on Windows...could that be related?
from madge.
Hmm, that's weird! I never tried it in windows before .. I'll boot up my virtual machine and give it a try!
from madge.
I tried it now, and confirmed it's a problem when running madge on Windows :( To much modules that I use seems to be incompatible with Windows at this time. I can't even run the unittests. Run it on Mac or Linux and it should be ok.
from madge.
Well, that's unfortunate. Hopefully that can be remedied in the future. For now, the image you generated will actually work for me. When I need a new image...I'll swipe my wife's mac while she's not looking ;) Thanks for looking into this issue and for working on this project!
from madge.
I also was having this issue and traced it to an issue with the dependent library findit: https://github.com/substack/node-findit/issues/5
If you modify the index.js file within the findit library (as mentioned in the link above) you can enable a workaround and get madge file enumeration to work on windows.
findit in turn is using node libraries for file enumeration so a related issue is opened in the node libuv package
joyent/libuv#613
Per comments in the original issue, an alternative file enumerating library may work on windows, but would be up to pahen if he wants to change to it: https://github.com/soldair/node-walkdir
from madge.
Thanks very much @israels for looking into this issue. Since the API of node-walkdir was compatible with node-findit I've now done the switch and it seems to work just fine. Tested it in Windows too, and it works much better now. I published v0.1.4 to NPM with the fix. @EisenbergEffect may be interested to give it a spin again now I suppose :)
from madge.
Awesome!
On Thu, Jan 10, 2013 at 3:41 PM, Patrik Henningsson <
[email protected]> wrote:
Thanks very much @israels https://github.com/israels for looking into
this issue. Since the API of node-walkdir was compatible with node-findit
I've now done the switch and it seems to work just fine. Tested it in
Windows too, and it works much better now. I published v0.1.4 to NPM with
the fix. @EisenbergEffect https://github.com/EisenbergEffect may be
interested to give it a spin again now I suppose :)—
Reply to this email directly or view it on GitHubhttps://github.com//issues/8#issuecomment-12117538.
Rob Eisenberg,
Blue Spire Consulting, Inc.
Caliburn Project
850.264.3996
from madge.
Running now gives me:
module.js:340
throw err;
^
Error: Cannot find module 'walkdir'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object. (C:\Users\EisenbergEffect\AppData\Roaming\npm\node_mod
ules\madge\lib\parse\base.js:10:11)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:362:17)
If I install the walkdir package manually, it seams to work.
from madge.
That seems very weird since package.json is up to date ..
Can you list the folders in C:\Users\EisenbergEffect\AppData\Roaming\npm\node_mod
ules\madge\node_modules?
Did you install walkdir globally or locally to fix the problem?
from madge.
Folder there are: coffee-script, colors, commander, commandir, detective,
findit, graphiz, resolve, uglify-js
I fixed the problem with a global install of walkdir.
On Sun, Feb 3, 2013 at 9:49 AM, Patrik Henningsson <[email protected]
wrote:
That seems very weird since package.json is up to date ..
Can you list the folders in
C:\Users\EisenbergEffect\AppData\Roaming\npm\node_mod
ules\madge\node_modules?Did you install walkdir globally or locally to fix the problem?
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/8#issuecomment-13047896.
Rob Eisenberg,
Blue Spire Consulting, Inc.
Caliburn Project
850.264.3996
from madge.
Strange .. and you're installing madge with NPM? If so, can you copy the entire output when running "npm install madge" and include it here? If you're installing directly from the GitHub repository can you include the output when running "npm install" in the project folder?
from madge.
Here you go:
C:\Users\EisenbergEffect>npm install -g madge
npm http GET https://registry.npmjs.org/madge
npm http 304 https://registry.npmjs.org/madge
npm http GET https://registry.npmjs.org/commander/1.0.0
npm http GET https://registry.npmjs.org/detective/0.1.1
npm http GET https://registry.npmjs.org/walkdir/0.0.5
npm http GET https://registry.npmjs.org/resolve/0.2.3
npm http GET https://registry.npmjs.org/graphviz/0.0.7
npm http GET https://registry.npmjs.org/commondir/0.0.1
npm http GET https://registry.npmjs.org/uglify-js/1.2.6
npm http GET https://registry.npmjs.org/colors/0.6.0-1
npm http GET https://registry.npmjs.org/coffee-script/1.3.3
npm http 304 https://registry.npmjs.org/detective/0.1.1
npm http 304 https://registry.npmjs.org/resolve/0.2.3
npm http 304 https://registry.npmjs.org/walkdir/0.0.5
npm http 304 https://registry.npmjs.org/commander/1.0.0
npm http 304 https://registry.npmjs.org/commondir/0.0.1
npm http 304 https://registry.npmjs.org/uglify-js/1.2.6
npm http 304 https://registry.npmjs.org/graphviz/0.0.7
npm http 304 https://registry.npmjs.org/colors/0.6.0-1
npm http 304 https://registry.npmjs.org/coffee-script/1.3.3
npm http GET https://registry.npmjs.org/temp
npm http 304 https://registry.npmjs.org/temp
C:\Users\EisenbergEffect\AppData\Roaming\npm\madge ->
C:\Users\EisenbergEffect\A
ppData\Roaming\npm\node_modules\madge\bin\madge
[email protected]:\Users\EisenbergEffect\AppData\Roaming\npm\node_modules\madge
node_modules\commondir
[email protected]:\Users\EisenbergEffect\AppData\Roaming\npm\node_modules\madge\n
ode_modules\colors
[email protected]:\Users\EisenbergEffect\AppData\Roaming\npm\node_modules\madge
node_modules\commander
[email protected]:\Users\EisenbergEffect\AppData\Roaming\npm\node_modules\madge
node_modules\detective
[email protected]:\Users\EisenbergEffect\AppData\Roaming\npm\node_modules\madge\no
de_modules\resolve
[email protected]:\Users\EisenbergEffect\AppData\Roaming\npm\node_modules\madge\no
de_modules\walkdir
[email protected]:\Users\EisenbergEffect\AppData\Roaming\npm\node_modules\ma
dge\node_modules\coffee-script
[email protected]:\Users\EisenbergEffect\AppData\Roaming\npm\node_modules\madge
node_modules\uglify-js
[email protected]:\Users\EisenbergEffect\AppData\Roaming\npm\node_modules\madge\node_
modules\graphviz\node_modules\temp
[email protected]:\Users\EisenbergEffect\AppData\Roaming\npm\node_modules\madge\n
ode_modules\graphviz
[email protected] C:\Users\EisenbergEffect\AppData\Roaming\npm\node_modules\madge
(Now I see walkdir...perhaps I just wasn't up to date before?)
On Sun, Feb 3, 2013 at 1:53 PM, Patrik Henningsson <[email protected]
wrote:
Strange .. and you're installing madge with NPM? Can you copy the entire
output when running "npm install madge" and include it here?—
Reply to this email directly or view it on GitHubhttps://github.com//issues/8#issuecomment-13051619.
Rob Eisenberg,
Blue Spire Consulting, Inc.
Caliburn Project
850.264.3996
from madge.
Yea, seems correct. Don't know why you had problem before .. but glad it worked for you now :)
from madge.
Related Issues (20)
- Cannot find module node:stream HOT 2
- "skipped" files that are from node_modules?
- require statement is not detected by madge
- Option to draw graph of npm packages instead of modules
- glob cli <src...> parameters
- fix output.sh syntax
- trying to understand madge's circular dependency results for an Angular project HOT 1
- option to get dependents, recursively
- Feature request: topological sort for dependencies
- ts config alias does not work at all HOT 8
- Not able to call madge from esm codebase. HOT 2
- Wrong result HOT 1
- Release a madge version to solve "Not all imports in TypeScript are detected" HOT 6
- Allow changing color for npm_modules
- Add option to show only the node module name instead of full file path
- Support package.json "imports" field ("#hash"-style imports)
- support .css/less url
- Calculate dependency require path
- Include images in the tree
- Update typescript version for v7 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from madge.