Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

OshJones's avatar

laravel mix not compiling css

Hi,

currently trying to set up laravel mix to compile my scss. I run a fresh install, run npm install and npm run dev.

I'm following this video https://www.youtube.com/watch?v=TeEsyhBZhUg

However, when I run npm run watch, my js\app.js is highlighted yellow but my \cssz\app.css stays green (even when I make changes)

does anyone have any info on this please?

PS my webpack.mix.js looks like this


/*
 |--------------------------------------------------------------------------
 | Mix Asset Management
 |--------------------------------------------------------------------------
 |
 | Mix provides a clean, fluent API for defining some Webpack build steps
 | for your Laravel application. By default, we are compiling the Sass
 | file for the application as well as bundling up all the JS files.
 |
 */

mix.js('resources/assets/js/app.js', 'public/js')
   .sass('resources/assets/sass/app.scss', 'public/css');```

0 likes
5 replies
bobbybouwmann's avatar

You should not update your app.css file, but you should update the app.scss file. The app.scss will be compiled to app.css.

OshJones's avatar

I'm not updating my app.css. It shows in the code that i'm compiling the correct file i hope.

The app.css is updated correctly from the scss, but it just doesn't register when i run the watch command. I'm just curious why this would be.

Thanks for your feedback

bobbybouwmann's avatar
Level 88

Your config file looks correct to me. Can you remove the node_modules directory and run npm install again?

3 likes
OshJones's avatar

Yeh that fixed the issue. weird problem.

Thanks for your help.

1 like
bobbybouwmann's avatar

Yeah, it sometimes happens that the modules aren't symlinked or downloaded correctly.. Sadly enough

Please or to participate in this conversation.