Misleading error, when used with `html-webpack-plugin`
See original GitHub issue- Operating System: macOS 10.15.2
- Node Version: v10.17.0
- NPM Version: 6.11.3
- webpack Version: webpack@4.41.5 webpack-cli@3.3.10
- mini-css-extract-plugin Version: mini-css-extract-plugin@0.9.0
Expected Behavior
Error thrown that lead to something meaningful (still not sure what actually goes wrong)
Actual Behavior
Thrown the error in some third-party lib
% npm run build -- --mode development
> example@1.0.0 build /Users/user/foo
> webpack "--mode" "development"
/Users/user/foo/node_modules/neo-async/async.js:16
throw new Error('Callback was already called.');
^
Error: Callback was already called.
at throwError (/Users/user/foo/node_modules/neo-async/async.js:16:11)
at /Users/user/foo/node_modules/neo-async/async.js:2818:7
at process._tickCallback (internal/process/next_tick.js:61:11)
Code
https://gist.github.com/ogonkov/2e23941414d6f0b3d5328bd80cba5674
How Do We Reproduce?
- Checkout gist above
npm i
npm run build
Issue Analytics
- State:
- Created 4 years ago
- Reactions:11
- Comments:38 (11 by maintainers)
Top Results From Across the Web
Handle loading errors & fallback with HtmlWebpackPlugin
If you use HtmlWebpackPlugin & sometimes things go wrong while your bundles are loading, we've got you covered.
Read more >Error using partials with HTML Webpack Plugin - Stack Overflow
I'm trying to create a setup with static HTML partials using the HTML Webpack Plugin, but running into some ...
Read more >Html-webpack-plugin NPM
If you have plugins that make use of it, html-webpack-plugin should be ... showErrors, {Boolean}, true, Errors details will be written into the...
Read more >HTML Webpack Plugin
HTML Webpack Plugin. npm version Dependency Status bitHound Score Build status. This is a webpack plugin that simplifies creation of HTML files to...
Read more >html-webpack-tags-plugin - npm
lets you define html tags to inject with html-webpack-plugin. ... bundle tags (should be set to false when using any script tag external...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
CSS-related issues in
html-webpack-plugin
:Issues in
mini-css-extract-plugin
:Hit that issue as well, cost me a few hours already 😦 Thanks @ogonkov for reporting with reproducer.
@klesun a viable workaround (works for me) might be to replace
MiniCssExtractPlugin
by a simplefile-loader
:If you also have regular JS imports then of course 2 distinct CSS rules are required.
UPDATE: just found that stackoverflow entry… 😉 Hopefully still useful to have the workaround detailed here.