Skip to content

Conversation

@alexander-akait
Copy link
Member

Now you can see:

Error parsing bundle asset "/home/alexander-akait/IdeaProjects/webpack-bundle-analyzer-reproducer-409/dist/public/index.mjs": Cannot read properties of undefined (reading 'arguments') {
  cause: TypeError: Cannot read properties of undefined (reading 'arguments')
      at getModulesLocations (/home/alexander-akait/IdeaProjects/webpack-bundle-analyzer-reproducer-409/node_modules/webpack-bundle-analyzer/lib/parseUtils.js:254:24)
      at Object.ExpressionStatement (/home/alexander-akait/IdeaProjects/webpack-bundle-analyzer-reproducer-409/node_modules/webpack-bundle-analyzer/lib/parseUtils.js:44:35)
      at c (/home/alexander-akait/IdeaProjects/webpack-bundle-analyzer-reproducer-409/node_modules/acorn-walk/dist/walk.js:58:37)
      at Object.skipThrough (/home/alexander-akait/IdeaProjects/webpack-bundle-analyzer-reproducer-409/node_modules/acorn-walk/dist/walk.js:186:39)
      at c (/home/alexander-akait/IdeaProjects/webpack-bundle-analyzer-reproducer-409/node_modules/acorn-walk/dist/walk.js:58:37)
      at base.Program.base.BlockStatement.base.StaticBlock (/home/alexander-akait/IdeaProjects/webpack-bundle-analyzer-reproducer-409/node_modules/acorn-walk/dist/walk.js:198:7)
      at c (/home/alexander-akait/IdeaProjects/webpack-bundle-analyzer-reproducer-409/node_modules/acorn-walk/dist/walk.js:58:37)
      at Object.recursive (/home/alexander-akait/IdeaProjects/webpack-bundle-analyzer-reproducer-409/node_modules/acorn-walk/dist/walk.js:59:7)
      at parseBundle (/home/alexander-akait/IdeaProjects/webpack-bundle-analyzer-reproducer-409/node_modules/webpack-bundle-analyzer/lib/parseUtils.js:26:8)
      at Object.getViewerData (/home/alexander-akait/IdeaProjects/webpack-bundle-analyzer-reproducer-409/node_modules/webpack-bundle-analyzer/lib/analyzer.js:87:22)
}

Useful for #409 (comment)

alexander-akait and others added 2 commits July 30, 2025 15:03
Now you can see:
```
Error parsing bundle asset "/home/alexander-akait/IdeaProjects/webpack-bundle-analyzer-reproducer-409/dist/public/index.mjs": Cannot read properties of undefined (reading 'arguments') {
  cause: TypeError: Cannot read properties of undefined (reading 'arguments')
      at getModulesLocations (/home/alexander-akait/IdeaProjects/webpack-bundle-analyzer-reproducer-409/node_modules/webpack-bundle-analyzer/lib/parseUtils.js:254:24)
      at Object.ExpressionStatement (/home/alexander-akait/IdeaProjects/webpack-bundle-analyzer-reproducer-409/node_modules/webpack-bundle-analyzer/lib/parseUtils.js:44:35)
      at c (/home/alexander-akait/IdeaProjects/webpack-bundle-analyzer-reproducer-409/node_modules/acorn-walk/dist/walk.js:58:37)
      at Object.skipThrough (/home/alexander-akait/IdeaProjects/webpack-bundle-analyzer-reproducer-409/node_modules/acorn-walk/dist/walk.js:186:39)
      at c (/home/alexander-akait/IdeaProjects/webpack-bundle-analyzer-reproducer-409/node_modules/acorn-walk/dist/walk.js:58:37)
      at base.Program.base.BlockStatement.base.StaticBlock (/home/alexander-akait/IdeaProjects/webpack-bundle-analyzer-reproducer-409/node_modules/acorn-walk/dist/walk.js:198:7)
      at c (/home/alexander-akait/IdeaProjects/webpack-bundle-analyzer-reproducer-409/node_modules/acorn-walk/dist/walk.js:58:37)
      at Object.recursive (/home/alexander-akait/IdeaProjects/webpack-bundle-analyzer-reproducer-409/node_modules/acorn-walk/dist/walk.js:59:7)
      at parseBundle (/home/alexander-akait/IdeaProjects/webpack-bundle-analyzer-reproducer-409/node_modules/webpack-bundle-analyzer/lib/parseUtils.js:26:8)
      at Object.getViewerData (/home/alexander-akait/IdeaProjects/webpack-bundle-analyzer-reproducer-409/node_modules/webpack-bundle-analyzer/lib/analyzer.js:87:22)
}
```

Useful for #409 (comment)
@valscion
Copy link
Member

This might cause a lot of extra output when multiple bundles have errors. But maybe the extra details are indeed worth it as debugging these cases would be tricky without this change.

Copy link
Member

@valscion valscion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! I wonder if this change should still be mentioned in the changelog?

@alexander-akait
Copy link
Member Author

@valscion not sure, it is just DX, feel free to add if you want

@valscion valscion merged commit f5af532 into master Aug 1, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants