Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web App fails to boot: Unable to handle null values in <chunk>.files Array #158

Closed
SimulatedGREG opened this issue Mar 10, 2022 · 1 comment

Comments

@SimulatedGREG
Copy link

SimulatedGREG commented Mar 10, 2022

Describe the bug
I'm not sure what causes our Stats output to create a null value in a chunk's files array, but the parsing logic around this breaks the entire web application.

Here's what our stats output looks like...
image

And here's the error we get when trying to load it...
image
image

I was able to find this piece of logic here, https://github.com/statoscope/statoscope/blob/master/packages/webpack-model/src/handleCompilation.ts#L426. I noticed there is a .filter(Boolean) after the .map. I believe putting the .filter first would solve this issue.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://statoscope.tech
  2. Upload this stats output (this is really trimmed down for security reasons). https://gist.github.com/SimulatedGREG/97443730ff9637bcbf90151f2154af8b
  3. See browser console for error.

Expected behavior
I'd expect to use https://statoscope.tech to load a Stats output from my webpack configuration.

Versions:

  • Node (for non-browser bug): 14.14.0
  • Webpack: 5.69.1
  • Statoscope: @statoscope/webpack-plugin@5.20.1
@smelukov
Copy link
Member

Solved in 5.22 ☺️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants