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

lastMinuteMan's avatar

Empty app.css and app.scss files!

I've been working through the laracast tutorials, and learning a lot as a total newbie to Laravel.

Now working on another tutorial, but being hindered by the fact that my /public/app.css and /resources/sass/app.scss files are ... empty.

I've installed npm, and I've run 'npm run dev' .. but still nothing. Should these files be populated with something straight away (without running npm)? Either way, they're blank, and I'm scratching around for a solution!

0 likes
8 replies
Sinnbeck's avatar

Running npm run dev will fill the app.css with the content of app.scss (compiled of course). So to get data in app.css you need to write som css in the scss file :) Scss i just css with logic (loop, variables and such).

Try putting in to following in the app.scss file

body {
    background: red;
}
lastMinuteMan's avatar

Ah .. yes, that worked :-)

Hmm .. the tutorial I've been working through appears to have a css file full of bootstrap stuff from the initial project setup - maybe this is something that used to be done (tutorial is from 2017), and now needs to be done manually?

Actually, I've spotted that in the package.json file in the tutorial, it brings in "bootstrap-sass", which isn't in mine ... maybe that's something to do with it?

lastMinuteMan's avatar
lastMinuteMan
OP
Best Answer
Level 1

Ah! I found the answer in the Laravel docs for v6 which I'm using - you now need to install Bootstrap using artisan - I've done this, and now have a very full app.css file. Great!

2 likes
myrat's avatar

I couldn't find solution of this for hours. Thanks!

p.s. these commands helped me with laravel 6.0.3: 1) composer require laravel/ui --dev 2) php artisan ui bootstrap 3) npm install && npm run dev

2 likes
Sinnbeck's avatar

Remember to mark as solved in case others have the samme issue :)

Please or to participate in this conversation.