question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Stats.json analyser does not work

See original GitHub issue

Uploading stats.json to the stats analyser tool does not work.
Console output says Uncaught SyntaxError: Unexpected token r in JSON at position 0 when uploading any stats.json I did webpack --profile --json > stats.json to generate the file.

What’s the fix for this?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
philstrongcommented, Jun 8, 2016

stats file needs to have only an object. If you have console.log anywhere in your webpack.config.js or included modules then it will fail. Open up the stats file and see you have

0reactions
bebrawcommented, Aug 7, 2016

The JSON is invalid for a reason or another, yup. Please use Stack Overflow with enough detail for questions like this. 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

webpack-bundle-analyzer is not working - Stack Overflow
I run below command to create stats.json ...
Read more >
Webpack Visualizer - Chris Bateman
Visualize and analyze your Webpack bundle to see which modules are taking up space and which might be duplicates.
Read more >
Stats Data - webpack
Stats Data. When compiling source code with webpack, users can generate a JSON file containing statistics about modules. These statistics can be used...
Read more >
Webpack-bundle-analyzer NPM - npm.io
If true , webpack stats JSON file will be generated in bundle output directory ... you can generate the stats file with this...
Read more >
How to use the webpack bundle analyzer - Jakob Lind
There are two things you need to do. First, generate a stats.json file. And secondly, run webpack-bundle-analyzer with the generated stats.json file from ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found