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

No such label 'done hook' for WebpackLogger.timeEnd() #499

Open
NexxLuo opened this issue Mar 22, 2022 · 6 comments
Open

No such label 'done hook' for WebpackLogger.timeEnd() #499

NexxLuo opened this issue Mar 22, 2022 · 6 comments

Comments

@NexxLuo
Copy link

NexxLuo commented Mar 22, 2022

webpack v5.70.0
webpack-bundle-analyzer v4.5.0
new BundleAnalyzerPlugin()

QQ图片20220322151534

@ArTiSTiX
Copy link

I also have this issue when using webpack compiler in js, but not in CLI.
If the compilation fails (compiled with some errors), we have this Fatal error instead of a normal compilation failure.

@valscion
Copy link
Member

Are you able to create a reproduction repository showing this error happening?

@ArTiSTiX
Copy link

In fact i was able to find the exact case why this is happening.

In the Webpack run callback, if something throws it will trigger this error.

Ex:

const webpack = require('webpack');
const config = require('./config');
const compiler = webpack(config);

compiler.run((err, stats) => {
  throw new Error('something');
});

If the WebpackBundleAnalyzer is configured, it should trigger this error.

@valscion
Copy link
Member

Adding a test that asserts the error thrown during compiler run would be a nice addition! Bonus points if the issue can be fixed, too

@amareshsm
Copy link
Contributor

@valscion The error message seems to be from Webpack logger. Can you pls brief what kind fix is expected here?.

@valscion
Copy link
Member

I don't really know what is the expected outcome to be honest 😅. What's the output if this same error is triggered but webpack-bundle-analyzer is not in the plugins list? Does webpack output the error in a nicer way that time?

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

4 participants