nhayder
2 weeks ago
224
9
Mix

Laravel mix is not complying font awesome properly

Posted 2 weeks ago by nhayder

this should be easy but yet its not working for me, i'm using laravel 5.8 to build me app and i need to compile font awesome through npm.

the package is already added to the app but after npm run? it looks like font are missing across my app.

this is my app.scss as per fontawesome documentation

// [email protected]
$fa-font-path: "../webfonts";

@import '[email protected]/fontawesome-free/scss/fontawesome.scss';
@import '[email protected]/fontawesome-free/scss/solid.scss';
@import '[email protected]/fontawesome-free/scss/regular.scss';
@import '[email protected]/fontawesome-free/scss/brands.scss';

when i run npm run dev i can't see icons on the front end site neither i can find font folder on the public folder.

on chrome devTools i have this error

Failed to load resource: the server responded with a status of 404 (Not Found) 
fa-solid-900.woff2:1 // basically the font is missing ???

// and this error also whitch mean the same
GET http://127.0.0.1:8000/webfonts/fa-solid-900.ttf net::ERR_ABORTED 404 (Not Found)

any ideas on what is going on ???

Please sign in or create an account to participate in this conversation.