question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

mini-css-extract-plugin Callback was already called.

See original GitHub issue
  • Operating System: Mac Mojave 10.14.3
  • Node Version: v10.13.0
  • NPM Version: 6.4.1
  • webpack Version: 4.8.3
  • mini-css-extract-plugin Version: 0.10.0

Expected Behavior

html-loader attrs: [‘img:src’, ‘link:href’] can be used with MiniCssExtractPlugin.loader without error

Actual Behavior

An error occurred when html-loader attrs: [‘img:src’, ‘link:href’] and MiniCssExtractPlugin.loader were used together

Code

{
    test: /\.css$/i,
    exclude: /node_modules/,
    use: [
        MiniCssExtractPlugin.loader,
        'css-loader',
    ]
},
{
    test: /\.(htm|html)$/i,
    exclude: /node_modules/,
    use: [
        {
            loader: 'html-loader',
            options: {
                attrs: ['img:src', 'link:href']
            }
        },
    ]
},
/Users/xxx/project/landing2/node_modules/webpack/node_modules/neo-async/async.js:16
    throw new Error('Callback was already called.');
    ^

Error: Callback was already called.
    at throwError (/Users/xxx/project/landing2/node_modules/webpack/node_modules/neo-async/async.js:16:11)
    at /Users/xxx/project/landing2/node_modules/webpack/node_modules/neo-async/async.js:2818:7
    at process._tickCallback (internal/process/next_tick.js:61:11)

How Do We Reproduce?

"css-loader": "^0.28.11",
"html-loader": "^0.5.5",
"mini-css-extract-plugin": "^0.10.0",
"style-loader": "^0.21.0",
"webpack": "^4.8.3",

According to the above configuration, an error will occur

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
shaobeichencommented, Sep 2, 2020

@evilebottnawi help us check this issue,please

Read more comments on GitHub >

github_iconTop Results From Across the Web

Running webpack throws 'Callback was already called' error
I had this issue and it was related to a recent downgrade someone had made to mini-css-extract-plugin. We are using pnpm, so this...
Read more >
MiniCssExtractPlugin - webpack
This plugin extracts CSS into separate files. It creates a CSS file per JS file which contains CSS. It supports On-Demand-Loading of CSS...
Read more >
Solved: CCL1043: Error when launching development server '...
CCL1043: Error when launching development server 'Callback was already called.' Go to solution.
Read more >
生产环境报错- VueClub - Vue中文社区
Error: Callback was already called. at throwError (F:\VUE\workspace\angeltechnologygroup\node_modules_neo-async@2.6.1@neo-async\async.js:16:11) at ...
Read more >
求助kibana开发环境报错Error: No module factory available for ...
... \npm\node_modules\mini-css-extract-plugin\dist\loader.js:216:12 info ... info [bazel] ^ info [bazel] Error: Callback was already called.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found