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

Error parsing bundle asset #183

Closed
kagawagao opened this issue May 23, 2018 · 4 comments
Closed

Error parsing bundle asset #183

kagawagao opened this issue May 23, 2018 · 4 comments

Comments

@kagawagao
Copy link

Issue description

report error:

Error parsing bundle asset "xxx/dist/5.e2fb06a758ee3befa705.js": Cannot read property 'name' of undefined
Error parsing bundle asset "xxx/dist/13.3c2ac90a2079085d8b02.js": Cannot read property 'name' of undefined

Technical info

  • Webpack Bundle Analyzer version: 2.13.0
  • Webpack version: 4.8.1
  • Node.js version: 10.1.0
  • npm/yarn version: 6.0.1
  • OS: macOS High Sierra 10.13.4 (17E202)

Debug info

How do you use this module? As CLI utility or as plugin?

As plugin

If CLI, what command was used? (e.g. webpack-bundle-analyzer -O path/to/stats.json)

If plugin, what options were provided? (e.g. new BundleAnalyzerPlugin({ analyzerMode: 'disabled', generateStatsFile: true }))

new BundleAnalyzerPlugin({
  generateStatsFile: true
})

What other Webpack plugins were used?

  • webpack.DefinePlugin
  • MomentLocalesPlugin
  • FaviconsWebpackPlugin
  • HtmlWebpackPlugin
  • CopyWebpackPlugin
  • webpack.LoaderOptionsPlugin
  • FriendlyErrorsPlugin
  • MiniCSSExtractPlugin

stats file

stats.json.zip

@kagawagao
Copy link
Author

FYI:
this error is cause by this function

function isAsyncChunkPushExpression(node) {
const { callee } = node;
return (
callee.type === 'MemberExpression' &&
callee.property.name === 'push' &&
callee.object.type === 'AssignmentExpression' &&
(
callee.object.left.object.name === 'window' ||
// Webpack 4 uses `this` instead of `window`
callee.object.left.object.type === 'ThisExpression'
)
);
}

callee.object.left.object is undefined

@th0r
Copy link
Collaborator

th0r commented May 23, 2018

Could you provide one of those chunks that cause parse error?

@kagawagao
Copy link
Author

kagawagao commented May 23, 2018

I create a gist

@th0r
Copy link
Collaborator

th0r commented May 23, 2018

Fixed in v2.13.1

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

Successfully merging a pull request may close this issue.

3 participants