Open kb-ig opened 2 years ago
Are you by any chance on Node.js 20?
@XhmikosR While I cant be sure what I was using back then, I believe it would have been Node 14.
Having just tried to recreate this again now, I get the exact same output on versions 14, 16, 18, 20, 21.
I've created an MRP here.
I expect it's probably me not understanding how to use this library properly.
I'm hoping someone can help me understand how to use this, as I seem to be getting an empty object back when using
dependencyTree
.I have files along the lines of:
Above, where I state that a file depends on another, it imports the other file with
require()
.And I'm trying to get the dependency info like so:
Which outputs:
Obviously I'm expecting something other than an empty object for each file. If anyone can help me understand how to use this I'd appreciate it.