webpack-bundle-analyzer: Incompatible with webpack 2
Issue description
Was working brilliantly till I attempted to update to WebPack 2.2.0
Technical info
- Webpack Bundle Analyzer version: 2.2.3
- Webpack version: 2.2.0
- Node.js version: 6.9.3
- npm/yarn version: 0.18.1 (yarn)
- OS: macOS
Debug info
How do you use this module? As CLI utility or as plugin?
Tried both, same result
If CLI, what command was used? (e.g. webpack-bundle-analyzer -O path/to/stats.json
)
If plugin, what options were provided? (e.g. new BundleAnalyzerPlugin({ analyzerMode: 'disabled', generateStatsFile: true })
)
No options, just the defaults
Can’t generate stats.json as it blows up before then.
Error
Could't analyze webpack bundle:
TypeError: currentFolder.addModule is not a function
Could't find any javascript bundles in provided stats file
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 29 (10 by maintainers)
Commits related to this issue
- Fixes #49 Don't add a module to a non-module object — committed to MarshallOfSound/webpack-bundle-analyzer by MarshallOfSound 7 years ago
Should be fixed in
v2.4.0
Any update on this? I’m having the same issue as others. Seems to happen when there is a dynamic require statement found in a file being processed.
Ok great, I am able to reproduce the crash from your files, @Kepro. This will help in debugging this a lot 👍
node v7.6.0 npm 4.4.4 webpack 2.2.1 webpack-bundle-analyzer 2.3.1 4 apps stats.json.zip 1 app -> this app is problem stats.json.zip
so from our 4 apps, problem is in one app…
same issue here… that stats.json is now 18.4 MB big 😃 before we join all aplications together it’s working with webpack only with this settings that you can see down
Could’t analyze webpack bundle: TypeError: currentFolder.addModule is not a function Could’t find any javascript bundles in provided stats file
@cchamberlain it doesn’t pollute fs by generating report file.
Hmm, I don’t think this plugin was intended to work with
webpack-dev-server
. Try using this plugin without the dev server.