Reputation: 11
I am currently trying to learn Laravel by following tutorial however when I perform npm install
> npm run dev
my app.scss
folder is empty and I'm also missing the variables.scss
?
Please help! I have been searching google for the answer and nothing thus far.
Upvotes: 1
Views: 3788
Reputation: 1
Hope am replying in time save a soul pertaining the same.
Follow these steps if you are using Laravel 6:
require('./bootstrap');
composer require laravel/ui
php artisan ui bootstrap
npm install
npm run dev
The public\css\app.css should now be present and you could now use Bootstrap.
Upvotes: 0
Reputation: 330
You have to first install the Bootstrap and Vue scaffolding provided by Laravel which is located in the laravel/ui Composer package. Run the following to install:
composer require laravel/ui --dev
Once the laravel/ui package has been installed, you may install the frontend scaffolding using the ui Artisan command:
//to generate basic frontend scafollding
php artisan ui bootstrap
php artisan ui vue
php artisan ui react
You can also generate the login/registration scaffolding by appending "--auth" to either of the above. E.g
php artisan ui bootstrap --auth
Upvotes: 6
Reputation: 182
Same in my case too. I deleted node_module, clear the cache and re-installed npm, but again the same result. So, I copied the code of app.scss from another project and pasted it in the empty scss and now it is working fine.
Also, make sure that node env is not in production mode.
Upvotes: -1
Reputation: 7843
app.scss
is an empty file for you to implement your own style sheet. I don't think it comes with a variables.scss
by default. You can simply create new scss files in the /sass
folder and @import it to your app.scss
.
Upvotes: 0