Closed Sinewyk closed 8 years ago
Oh yeah. That's it, some kind of path issue. My first file is in the object as a relative path
process.cwd() === '/home/sinewyk/dev/repo'
'./app/scripts/main.js'
while it's trying to get '/home/sinewyk/dev/repo/app/scripts/main.js'
all others entries in the object have the correct expected form by disc, that is stuff like
'/home/sinewyk/dev/repo/node_modules/underscore/underscore.js'
Any ideas where it could be coming from ?
Ok ... fixed, I just needed to send an absolute path into browserify instead of a relative one, so that the entry file also had an expected absolute path instead of a relative one.
Maybe edit the readme, fullPaths: true needed, AND send and absolute path down the browserify bundle API.
@Sinewyk this is a bug in browserify – maybe you should open an issue or PR to have the supplied path made absolute when using fullPaths
?
@Sinewyk I am running into the same problem. Did you open a bug report with Browserify? If so, where?
Oh my bad. I bypassed the problem. I had a "classic" browserify workflow with all my custom things that worked. And then I simply run disc on the result file with --open.
Exactly like that (for example with gulp, but you can do that with anything really).
gulp.task('deps-tree', ['browserify'], function() {
var discSpawn = spawn('./node_modules/.bin/discify', ['./app/assets/scripts/bundle.js', '--open']);
discSpawn.on('close', function() {
process.exit(0);
});
});
don't forget to send fullPaths: true as option inside the browserify command.
When i try verbatim what you said in your example since v1.0.0
I get this
var row = byid[id]
is the culpritid was correctly the entry file at first, but it seems that he still didn't found the data inside byid, i'll try some Object.keys on byid to check what happened after I eat something.
any ideas on your side ?