Reputation: 14540
I'm new to Angular and running through a Udemy tutorial and trying to install fontawesome using npm.
I used 'npm install fontawesome' I also tried 'npm install --save-dev @fortawesome/fontawesome-free'
and now when I try to reference the min.css file like the image below I don't have the files. I checked the folder and they don't exist!
Did I not install it correctly?
Upvotes: 0
Views: 2359
Reputation: 24424
This way work for me
inslall the fortawesome 5.x package
npm install @fortawesome/fontawesome-free
in global style.scss add this
@import "@fortawesome/fontawesome-free/css/all.css";
or this
@import '../node_modules/@fortawesome/fontawesome-free/css/all.css';
another way by using cdn
just add thi like to index.html
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css" integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay" crossorigin="ano nymous">
Upvotes: 3