Comments (5)
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 ?
from disc.
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.
from disc.
@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
?
from disc.
@Sinewyk I am running into the same problem. Did you open a bug report with Browserify? If so, where?
from disc.
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.
from disc.
Related Issues (20)
- TypeError: Invalid non-string/buffer chunk HOT 1
- TypeError: Cannot read property 'source' of undefined HOT 18
- Flat disc instead of hierarchy HOT 2
- module not resolving when using disc HOT 2
- Cant pipe into discify HOT 1
- --open in conjunction with --output
- feature request: console reporter HOT 1
- Manage external package only bundle HOT 3
- discify missing some scripts HOT 2
- Outdated dependency `bl` causing install failure HOT 8
- Flattened npm 3 installs don't display dependency hierarchies correctly
- Unexpected token: ILLEGAL HOT 2
- ES6 syntax (computed property names) causes esprima-fb error
- --open does not work on Windows HOT 1
- error "Duplicate data property in object literal not allowed in strict mode" HOT 1
- Update d3 to v4 modules
- Can the visualization be used with other (non-bundle-related) data?
- Not working with browserify+vue?
- fix npm 3 module resolution HOT 5
- release new version 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 disc.