I am currently using a setup with NO Bower and ONLY using NPM with Gulp for AngularJS. I installed Font-Awesome from npm. I am also using SASS/SCSS for this.

The stylesheet is already loaded whenever i would run gulp serve as I have checked it using the developers tools in chrome, but the fonts are not loaded with it as I am outputted with a 404 when loading the font-awesome fonts.

I used the $fa-font-path variable with it. I imported it using:

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

Bootstrap-Sass is working fine and loading its font values using $icon-font-path despite of the fonts not being in the folder being served using:

$icon-font-path: "node_modules/bootstrap-sass/assets/fonts/bootstrap/";
@import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap";

I've tried importing it using CDN and it is fully working, but I do NOT want to use the CDN as an exception for this as I am using NPM for all my dependencies with this.

So, why is font-awesome not working? Am I doing something wrong with my setup?

  • I had the same issue with another lib, please make sure you are not wrong with the path check folder names and path you are giving on are the same. 404 error mean that can't find what you are trying to load – Sider Topalov Apr 22 at 14:46
  • @SiderTopalov That's why I am asking here. Yes 404 means invalid path, that's why I am asking for the correct setup here in case I am doing something wrong with mine. :) – Rin Minase Apr 22 at 15:35
  • @SiderTopalov I found $fa-font-path in _variables.scss file inside font-awesome in node_modules. So since the default one (without overriding it) did not work (which was ../font), i tried changing it to node_modules/font-awesome/fonts/ like what i did in my bootstrap-sass as it is working for bootstrap. But sadly, it did not work for font-awesome. Still having a 404 message for it. – Rin Minase Apr 22 at 15:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.