Can someone please explain to me how to Install Laravel Mix ( Laravel/Homestead + Bedrock + Sage )

OK so I have installed Laravel/Homestead. Don’t fully understand everything yet, but I am also using vagrant box. I have installed bedrock on my virtual machine, as well as the Sage theme. Now I began to play around with my WordPress install, but I have noticed that my SCSS / CSS does not seem to be loading on the front end of my site.

I believe this is due to the fact that I do not have some kind of compiler installed in this web stack yet ( I am new to SCSS, compilers, Laravel, etc ). I’ve been reading the laravel Mix documentation for the past few days and I believe this is what I need to get things working properly.

Inside my sage theme file I ran ( npm install ), which is supposed to be the first step in installing laravel mix. I receive this error after the command runs for a while. I believe it is supposed to generate a dev file or folder, but instead I receive a few errors:

Can someone please explain to me how I can setup Laravel Mix? If I understand correctly I need a compiler for my SCSS code, and I would like to use the “watch” function so that when SCSS/JS files on my local machine are saved, the changes are immediately sent to the local dev site without me having to reload the page.

Sorry in advance to anyone who attempts to help me out here. I am a complete noob when it comes to all of this and I honestly don’t know how to even ask for help, or if I am wording my current issue in a way that is understandable to others.

I have removed the sage theme and restarted with a fresh install. Using Yarn && Yarn Build in the app/themes/{theme file} folder leads to an error.

Npm install in the same folder also causes an error. Neither have allowed me to compile my SCSS or JS files.

This topic was automatically closed after 42 days. New replies are no longer allowed.