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.

Laravel Mix breaks with css-loader 6.x

See original GitHub issue

After running npm update this morning, I got a bunch of errors when trying to build. After researching things, it appears that when I ran npm update, something updated webpack’s css-loader package from 5.x to 6.x which has a lot of breaking changes.

I’m not sure if Laravel Mix allowed npm update to update css-loader, or something else, but I’m wondering if anyone has a hotfix in the meantime?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:7
  • Comments:27

github_iconTop GitHub Comments

3reactions
thecrypticacecommented, Jul 15, 2021

Nah, that shouldn’t be an issue. In the mean time you can explicitly add "css-loader": "^5.2" to your projects package.json file and that should hopefully resolve it.

2reactions
maximalcommented, Jul 27, 2021

@JeffreyWay, sorry for the delay. Can confirm that build passes fine after the upgrade to v6.0.27.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Laravel Mix breaks with css-loader 6.x · Issue #3036 - GitHub
After researching things, it appears that when I ran npm update , something updated webpack's css-loader package from 5.x to 6.x which has...
Read more >
Upgrade to Mix 6 | Laravel Mix Documentation
Laravel Mix 6 ships with support for the latest versions of numerous dependencies, including webpack 5, PostCSS 8, Vue Loader 16, and more....
Read more >
Newest 'laravel-mix' Questions - Stack Overflow
The Laravel Mix of my projects becomes very odd. For example, if both the JS file and CSS file need to compile, it...
Read more >
Compiling Assets (Mix) - The PHP Framework For Web Artisans
Laravel Mix provides a fluent API for defining Webpack build steps for your Laravel application using several common CSS and JavaScript pre-processors.
Read more >
Assets building broke after upgrade to Laravel Mix 4 - Laracasts
I have this setup: const mix = require('laravel-mix'); mix.webpackConfig({ module: { rules: [ { test: /\.scss$/, use: [ { loader: 'sass-loader', ...
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