webpack-visualizer icon indicating copy to clipboard operation
webpack-visualizer copied to clipboard

Cannot read property 'forEach' of undefined

Open rchod opened this issue 6 years ago • 8 comments

screenshot from 2018-09-19 16-44-27

FYI the file I tried to upload was like 54 Mb

rchod avatar Sep 19 '18 14:09 rchod

I'm seeing the same, with a file size of 60MB and using Webpack 4

hmafzal avatar Nov 20 '18 21:11 hmafzal

I got this when uploading a stats file generated by a multi-compiler run of webpack.

stof avatar Feb 21 '19 23:02 stof

I'm seeing this exact issue with a 12MB stats file generated from webpack 4.31.0.

bryanressler-idmod avatar May 10 '19 18:05 bryanressler-idmod

Seeing this issue with a 25MB stats file generated from Webpack 4.

mflores-verys avatar Jun 20 '19 16:06 mflores-verys

I'm also seeing this with a 60,8MB stats.json file

rtyx avatar Sep 23 '19 09:09 rtyx

33.5Mb also doesnt work.

crtl avatar Feb 23 '21 17:02 crtl

37.8MB also doesnt work

oneEyedSunday avatar Mar 17 '21 11:03 oneEyedSunday

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,
    ...

JasonKleban avatar Apr 08 '21 20:04 JasonKleban