webpack-visualizer
webpack-visualizer copied to clipboard
Cannot read property 'forEach' of undefined
FYI the file I tried to upload was like 54 Mb
I'm seeing the same, with a file size of 60MB and using Webpack 4
I got this when uploading a stats file generated by a multi-compiler run of webpack.
I'm seeing this exact issue with a 12MB stats file generated from webpack 4.31.0.
Seeing this issue with a 25MB stats file generated from Webpack 4.
I'm also seeing this with a 60,8MB stats.json file
33.5Mb also doesnt work.
37.8MB also doesnt work
For me, it was because expected stats object properties were not found by getAssetsData()
.
https://github.com/chrisbateman/webpack-visualizer/blob/ea9ed0b8e8c83b45c398aa7605f9d8478f031f23/src/shared/util/stat-utils.js
However you control your stats options, make sure the ones it needs are emitted:
stats: {
...
chunks: true,
assets: true,
...