shinydashboard some Font Awesome Icons Not Working
For those newcomers in 2021, this icon ... does not exist error is due to the Font Awesome changing names to their icons between 4 and 5 (see background here). Below are solutions that do not require tag styles.
If you are getting this error message,
This Font Awesome icon ('{youriconname}') does not exist:* if providing a custom html_dependency
these name
checks can be deactivated with verify_fa = FALSE
then, you can either:
Embrace the change and rename your icon, looking at the library, link to 5.1.5 for example, to find a new name for your match. In my case it was changing icon('dashboard') to icon('tachometer-alt'). Search with your old name, and look at the free, not grayed out, icons for an alternative.
Use this useful workaround by @samssann from
shinydashboard
issue 373:- add
verify_fa = FALSE
argument toshiny::icon()
- use
shiny::icon("clock")
orfontawesome::fa("clock")
- add
P.S. You might find the icon still shows on your app despite the error as there is a shim to plug 4 to 5. See @jcheng's answer here from shiny issue #1966.
Now that shiny::icon is powered by the fontawesome r package, you can use fontawesome:::fa_tbl to help you find the names that are expected from the function. fontawesome:::fa_version also tells you what fontawesome version is currently in the R package.
Ok, I think the new ones in version 4.4 are not updated. You can probably request shiny
team to update them and they will do it very easily. Alternatively you can do it yourself by downloading them and replacing the previous content...
1. Go to the Font Awesome download page and get it
2. Locate your font awesome folder where you installed shiny
package. This should be somewhere like here ~\Documents\R\win-library\3.1\shiny\www\shared\font-awesome
3. Replace the content of this folder with new contents (you can delete the previous content if you want). Below is what I put in there
4. Now your app should work fine with new fonts
This is an older question, but the issue remains for me in July 2020. I found the solution in the github issues page. The trick is to make sure you are looking at the library of icons in the version of Font Awesome Shiny is calling. Currently (again, July 2020) the version is 4.7. All of these icons currently work.
Another option is to call the version of fontawesome you want using the following code within your app's ui function (this solution originally posted here):
tags$style("@import url(https://use.fontawesome.com/releases/v5.7.2/css/all.css);")