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

Stats parsing is broken Webpack 5 #530

Open
maciej-panecki-wttech opened this issue Oct 25, 2022 · 2 comments
Open

Stats parsing is broken Webpack 5 #530

maciej-panecki-wttech opened this issue Oct 25, 2022 · 2 comments

Comments

@maciej-panecki-wttech
Copy link

Issue description

I receive error: Error parsing bundle asset "...": Cannot read properties of undefined (reading 'arguments') inside the file of parseUtils.js line 254:

const minId = isOptimizedArray ? // Get the [minId] value from the Array() call first argument literal value
    node.callee.object.arguments[0].value : // `0` for simple array
    0;

node.callee.object is undefined which throws an error.

Technical info

  System:
    OS: macOS 12.6
    CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
    Memory: 66.48 MB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.18.0 - ~/.nvm/versions/node/v16.18.0/bin/node
    Yarn: 1.22.17 - ~/.nvm/versions/node/v10.24.1/bin/yarn
    npm: 8.19.2 - ~/.nvm/versions/node/v16.18.0/bin/npm
  npmPackages:
    clean-webpack-plugin: ^3.0.0 => 3.0.0 
    copy-webpack-plugin: ^10.1.0 => 10.2.4 
    css-minimizer-webpack-plugin: ^3.2.0 => 3.4.1 
    eslint-webpack-plugin: ^3.1.1 => 3.2.0 
    html-webpack-plugin: ^5.5.0 => 5.5.0 
    stylelint-webpack-plugin: github:panec/stylelint-webpack-plugin => 3.3.0 
    terser-webpack-plugin: ^5.2.5 => 5.3.6 
    tsconfig-paths-webpack-plugin: ^3.2.0 => 3.5.2 
    webpack: ^5.65.0 => 5.74.0 
    webpack-bundle-analyzer: ^4.6.1 => 4.6.1 
    webpack-cli: ^4.9.1 => 4.10.0 
    webpack-dev-server: ^4.6.0 => 4.11.1 
    webpack-merge: ^5.8.0 => 5.8.0 

Debug info

I generate json from webpack:

new BundleAnalyzerPlugin({
            analyzerMode: "disabled",
            generateStatsFile: true
        }),

and try to analyse it using this CLI: npx webpack-bundle-analyzer dist/stats.json

@maciej-panecki-wttech
Copy link
Author

stats.json.zip

@eamodio
Copy link

eamodio commented Feb 12, 2023

I'm seeing the same thing, but only on some of my assets

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

3 participants