webpack / analyse

analyse web app for webpack stats
http://webpack.github.com/analyse
882 stars 138 forks source link

Uncaught TypeError: Cannot read property 'sort' of undefined #18

Closed ChrisCinelli closed 8 years ago

ChrisCinelli commented 9 years ago

I am trying to use https://webpack.github.io/analyse/#home but I am getting this:

Uncaught TypeError: Cannot read property 'sort' of undefined
  r @ web.js:1
  t.onload @ 8.970b70af1d8094b96211.js:1
Phoenixmatrix commented 8 years ago

I'm getting that issue too. I used to use it all the time. Wonder what changed.

Phoenixmatrix commented 8 years ago

nevermind, figured it out. Looks like it does not work with multi-compiler mode.

@sokra any chance there's a way to ease that workflow?

sokra commented 8 years ago

You can extract the child stats from the stats json. I think it's in the children property. Copy it into a separate file and feed this into the analyse tool.

Technically this could be added as feature to the analyse tool, but it's a bit old and it's propably better to rewrite it completly.

rbalicki2 commented 8 years ago

I ran into this issue as well, and running cat stats.json | jq '.children[0]' > stats2.json does the trick. (Or children[1], etc.)

a-r-d commented 8 years ago

@ChrisCinelli I merged this PR: https://github.com/webpack/analyse/pull/21

I think it should solve your issue.

saketwipro99 commented 7 years ago

Kindly check the config.json of your "shared" folder in C:. make sure the routerIP is set to your machine IP and also stop all the services which are running before you do run.bat again.

w0rp commented 7 years ago

I hit this error again, and I was able to fix it by adding "modules": [] to the stats JSON. It looks like the JSON output didn't include a modules Array.

w0rp commented 7 years ago

Somehow my output has only "chunks" and no "modules," so I don't know what that's about.

slavafomin commented 5 years ago

Make sure that you generate the stats.json file with modules property set to true, otherwise it will not contain it and will cause the issue with most tools. Be advised, that verbose preset IS NOT including the modules field, despite what the documentation says.

Here's some more details: https://github.com/webpack/webpack/issues/9392

yeegor commented 4 years ago

Still experiencing this issue

vjpr commented 3 years ago

If using webpack-stats-plugin you must add the stats key like so:

        new StatsWriterPlugin({
          filename: 'stats.json',
          stats: {
            all: true,
          },
        })