I'm trying to install Laravel breeze but I keep getting Laravel Mix errors

Viewed 827

I'm trying to install Laravel Breeze in my new laravel application.

Everything used to work fine but when type npm run dev in the console I keep getting this error:

3 WARNINGS in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)

I think everything works fine but my login and register page are not styled. I also can´t find any solutions on the internet. I've tried to install Breeze in multiple new projects but this error keeps showing up.

Does anyone know how to fix this?

I've installed Breeze doing this:

  1. composer require laravel/breeze
  2. php artisan breeze:install
  3. npm install
  4. npm run dev (this gives me the error)

When I navigate to the login page this line shows up at the top of the page:

@vite(['resources/css/app.css', 'resources/js/app.js'])

3 Answers

For some reason, you may sometime have to run npm run dev multiple times, when the mix compilation fails. Often when working with new projects, I have to do it. See if this helps.

In order for your page to work fine include this above @vite(['resources/css/app.css', 'resources/js/app.js']), then run npm run dev again. It should work fine now.

Related