Shinku
Shinku

Reputation: 33

"Can't resolve '..node_modules/font-awesome/fonts/fontawesome-webfont.eot' "and other font awesome files

I have been cracking my head for a solution to this issue. Can someone please help?

Problem: I wanted to use font awesome in my application and I installed it through Angular-CLI

and included this in styles.scss

$fa-font-path: "../node_modules/font-awesome/fonts"; @import "../node_modules/font-awesome/scss/font-awesome";

webpack version: 4.44.2

error: enter image description here

Upvotes: 2

Views: 2992

Answers (1)

Cagri Tacyildiz
Cagri Tacyildiz

Reputation: 17610

If you installed font awesome with cli to project, You dont need to put it inside styles.scss jsut put inside angular.json styles attributes

 "node_modules/font-awesome/css/font-awesome.min.css",

or you can use it with adding Demo

<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css" rel="stylesheet"/>

inside index.html without using library

Upvotes: 4

Related Questions