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.

Unexpectedly fails with css-loader v4.0.0

See original GitHub issue

Just a heads up that I’m seeing this error with css-loader v4.0.0:

TypeError: text.forEach is not a function
    at childCompiler.runAsChild (/Users/danielbachhuber/projects/foodbloggerpro/wp-content/node_modules/extract-text-webpack-plugin/dist/loader.js:145:16)
    at compile (/Users/danielbachhuber/projects/foodbloggerpro/wp-content/node_modules/webpack/lib/Compiler.js:343:11)
    at hooks.afterCompile.callAsync.err (/Users/danielbachhuber/projects/foodbloggerpro/wp-content/node_modules/webpack/lib/Compiler.js:681:15)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/danielbachhuber/projects/foodbloggerpro/wp-content/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
    at AsyncSeriesHook.lazyCompileHook (/Users/danielbachhuber/projects/foodbloggerpro/wp-content/node_modules/webpack/node_modules/tapable/lib/Hook.js:154:20)
    at compilation.seal.err (/Users/danielbachhuber/projects/foodbloggerpro/wp-content/node_modules/webpack/lib/Compiler.js:678:31)

Here’s a corresponding thread on that repo: https://github.com/webpack-contrib/css-loader/issues/1135

The underlying culprit might be extract-text-webpack-plugin.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:16
  • Comments:9

github_iconTop GitHub Comments

2reactions
cotton9commented, Aug 21, 2020

Updating laravel-mix to “6.0.0-alpha.1” allowed me to compile using “npm run dev”. However, it killed my “npm run hot” process, reporting webpack-dev-server not being able to find webpack-cli/bin/config-yargs. Being an alpha version, I can’t complain about that, but it means the workaround won’t immediately work for some.

Luckily, I was able to get everything working again by simply rolling back to css-loader v3.6

2reactions
dontfeedthecodecommented, Aug 12, 2020

Updating the package.json file in the Laravel root dir to require “laravel-mix”: “6.0.0-alpha.1” fixed this for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unexpectedly fails with css-loader v4.0.0 · Issue #2450
Just a heads up that I'm seeing this error with css-loader v4.0.0: TypeError: text.forEach is not a function at childCompiler.
Read more >
Unexpectedly fails with css-loader v4.0.0
Just a heads up that I'm seeing this error with css-loader v4.0.0: TypeError: text.forEach is not a function at childCompiler.
Read more >
Webpack 4 Module parse failed: Unexpected character '@' ...
To solve this problem for Webpack 4 , first install sass-loader , node-sass , style-loader , and css-loader via npm :
Read more >
postcss-loader
Bug Fixes. unexpected failing on CSS syntax error (#593) (888d72e). access_time7 months ago. v7.0.0. local_offer v7.0.0 ... v4.0.0. local_offer v4.0.0 ...
Read more >
I have a Yarn problem when I try to deploy a Rails 6.x app. ...
I used to be able to deploy, but now I can't. The front end uses Vue. Rails 6.1.6 yarn 1.22.17. Here is the...
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