question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I cannot get font-awesome 5 icons to work

See original GitHub issue

I cannot for the life of me get font-awesome 5 icons to work for me. I am a bit of noob when it comes to Vue and Nuxt and Bulma, but I have had no problems with pretty much anything else.

I have tried adding the CDN in the nuxt.config, but no luck!

Any help is appreciated!

This is my buefy.js file:

import Buefy from 'buefy'

Vue.use(Buefy, {
  "css": true,
  "defaultIconPack": 'fas'
})```

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

41reactions
TarekAScommented, May 3, 2019

If you want to use NPM instead of a CDN, this is the proper way to do it:

  1. Install nuxt-fontawesome.
npm i nuxt-fontawesome
npm i @fortawesome/fontawesome-svg-core @fortawesome/vue-fontawesome
  1. Install an icon set, for example:
npm i @fortawesome/free-solid-svg-icons
  1. Edit nuxt.config.js as follows:
modules: [
  'nuxt-buefy',
  'nuxt-fontawesome'
],
buefy: {
  materialDesignIcons: false,
  defaultIconPack: 'fas',
  defaultIconComponent: 'font-awesome-icon'
},
fontawesome: {
  imports: [
    {
      set: '@fortawesome/free-solid-svg-icons',
      icons: ['fas']
    }
  ]
}
  1. Usage example:
<b-icon pack="fas" icon="home" size="is-large" />

@anteriovieira please, consider adding similar instructions to the Readme, might save someone else some time.

10reactions
m7rlincommented, Oct 23, 2018

The solution is to edit the nuxt configuration file nuxt.config.js as follows:

...
modules: [

    ['nuxt-buefy', { 
      defaultIconPack: 'fas', 
      materialDesignIconsHRef: "https://use.fontawesome.com/releases/v5.4.1/css/all.css" 
    }],

  ],
...

Have a nice day 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting | Font Awesome Docs
Your best option is to use a Font Awesome Kit which automatically creates a subset of just the icons you are using on...
Read more >
html - Font Awesome icons are not working, I have included all ...
Another issue is that the fontawesome css cannot find the font files which are required. Make sure they are in a folder called...
Read more >
Font Awesome 5 Icons not Showing? - Slick Media
So, for instance, you cannot show any icons within Regular or Light if you are using Font Awesome Free. 3. Make sure your...
Read more >
[Solved]: Font Awesome icons not showing on my website
Fix for manual Installation. Make sure that the Font Awesome CSS file is loaded and that the "webfonts" folder is not missing in...
Read more >
Font Awesome 5 Intro - W3Schools
To use the Free Font Awesome 5 icons, you can choose to download the Font Awesome library, or you can sign up for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found