julianjensen / ast-flow-graph

Creates a CFG from JavaScript source code.
Other
66 stars 11 forks source link

error at first run #11

Closed easa closed 5 years ago

easa commented 6 years ago

c:.....\app.js:5 cfg = CFG( src, { ^

TypeError: CFG is not a function at Object. (c:.....\app.js:5:12) at Module._compile (module.js:649:14) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3) at Function.Module.runMain (module.js:693:10) at startup (bootstrap_node.js:191:16) at bootstrap_node.js:612:3 Waiting for the debugger to disconnect... TypeError: CFG is not a function at Object. (c:.....\app.js:5:12) at Module._compile (module.js:649:14) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3) at Function.Module.runMain (module.js:693:10) at startup (bootstrap_node.js:191:16) at bootstrap_node.js:612:3

this is my error. and it's on startup. I'm nothing done yet :|

mithray commented 5 years ago

Hey man, I'm getting the same thing. I just found this project and I love the look of it but it seems to currently not run. I will either try to fix the source or I will look for another project, not sure which it will be.

julianjensen commented 5 years ago

It was actually a problem with the documentation. However, I liked the way the documentation did it, so I changed the code. The const CFG = require( 'ast-flow-graph' ) should now properly resolve to a function. Let me know if it doesn't work for you.