Micheasl
Micheasl

Reputation: 287

Laravel Mix Bootstrap Glyphicons not loading

I created a new laravel application and added the auth template.

I tried to add this button:

<button type="button" class="btn btn-default btn-lg">
    <span class="glyphicon glyphicon-stop" aria-hidden="true"></span>
</button>

But the glyphicons are not loading I get this error in my Chrome console:

GET http://localhost/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff2?448c34a56d699c29117adc64c43affeb
GET http://localhost/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff?fa2772327f55d8198301fdb8bcfc8158
GET http://localhost/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.ttf?e18bbf611f2a2e43afc071aa2f4e1512 

npm watch is already running.

What else could cause this error?

Upvotes: 2

Views: 1619

Answers (2)

Jorn L
Jorn L

Reputation: 21

This problem is caused by you accessing the site through http://localhost/something/public - and not using a VirtualHost.

Just had the exact same error myself, and realized it was requesting the files from http://localhost/ and not from the projectfolder.

Upvotes: 2

HFranco
HFranco

Reputation: 609

Run command npm run dev or npm run production in production

https://laravel.com/docs/5.4/mix#running-mix

Upvotes: 2

Related Questions