ENOENT, open 'c:\Development\iris-docs-webapp\webapp\node_modules\browserify\lib_empty.js'
this is the error-message i get when i try to start it on our `webapp\build\app.js` . Browserify is installed as sibling to our webapp folder so its looking in the wrong folder. I wonder why that is because npm knows how to do it.
Could you please post
- the full path to the source map file, or, if the source map is inlined in the compiled code, the full path to the compiled file.
- the source map (excluding the `mappings` field)
`c:\Development\iris-docs-webapp\webapp\build\app.js.map`. The app.js file ends in
`//# sourceMappingURL=app.js.map` and i started the tool from our root `c:\Development\iris-docs-webapp`
i see what you mean .. the `sources` section contains a reference to "..\node_modules\browserify\lib\_empty.js"
I have since identified a number of issue with my sourcemap generation process. The app.js created by browserify contains inlined `//# sourceMappingURL=data..` entries. So far so good, but whether i use `exorcist` or `gulp-sourcemaps` the resulting map still contains the entire code and inside that the original base64 encoded sourceMappingURL entries are still present...
@lydell to track this down it would be helpful to understand what it means if source-map-visualize is complaining about a missing file.
right now i understand the sourcemap to be an object with the properties `sources` and `sourcesContent`. both are arrays, the first containing the names the second the content .. when both have the same number of entries why exactly is it complaining about any missing files ?
This tool is _supposed_ to not try to look up a source file if the corresponding index in `sourcesContent` is non-null.
Is the corresponding index for "..\node_modules\browserify\lib_empty.js" non-null? If so, we should re-open.
It would be helpful if you could post the actual source map. It’s ok if you want to replace all strings in `sourcesContent` with short dummy data.
well first of all it really is not an issue with source-map-visualize but with either the map or the source-map-visualization lib. so thanks already for any help :)
none of them are null and all have content, but i did see that the error writes 'node_modules/browserify/node_modules/browser-pack/_prelude.js' is missing while the map has '../node_modules/browserify/node_modules/browser-pack/_prelude.js' inside it
Why isn’t it a problem with source-map-visualize? If all of the sources have `sourcesContent` entries it shouldn’t try to read the files. Based on your initial comment it seems like it does:
> ENOENT, open 'c:\Development\iris-docs-webapp\webapp\node_modules\browserify\lib_empty.js'
Really confused now…
Do you see the error message in the terminal or in the browser?
terminal → error in this CLI tool
browser → error in https://github.com/sokra/source-map-visualization