R shinydashboard instructions doesn't work,

Hi everyone,

I'm new in shiny world, so maybe my question is already asked, apologize for that.

Recently, i have a problem with shinyboard package (ui side), probably due to i update my R version (i already uninstall/install R and R-Studio and have last releases, i use MacOs 10.10.5) or cause i use some new packages like leaflet or plotly.

Here is an example, with "nothing inside" :

# Some libraries i use to use
library(leaflet)
library(shiny)
library(plotly)
library(shinydashboard)
library(dplyr)

ui <- dashboardPage(skin = "purple",
                    
                    dashboardHeader(title="Test"),
                    
                    dashboardSidebar(
                      
                      sidebarMenu(
                        menuItem("Blabla1", tabName = "blabla1", icon = icon("twitter-square")), 
                        menuItem("Blabla2", tabName = "blabla2", icon = icon("question-circle"))
                      )
                      
                    ),
                    dashboardBody(
                      
                      )
                    
)

When i use shiny package, it works fine, it's just when i use dashboard instruction, i have this error :

Error in htmlDependency("font-awesome", "5.3.1", "www/shared/fontawesome",  : 
  argument inutilisΓ© (package = "shiny")

Unused argument in shiny package?

I specify that the package / instructions shinydashboard worked very well until now and i have already develop a small application with shinydashboard (and so doesnt work now).

Thanks in advance,

The htmlDependency function is in the htmltools package, I believe. Could you try executing the following and showing us the results?

htmltools::htmlDependency
packageVersion("htmltools")

Along with the following after you get the error:

devtools::session_info()

Hi, thanks for quick answer, here are the results :

> htmltools::htmlDependency
function (name, version, src, meta = NULL, script = NULL, stylesheet = NULL, 
    head = NULL, attachment = NULL, all_files = TRUE) 
{
    if (isNamespace(parent.frame()) && any(substr(src, 1, 1) == 
        "/")) {
        warning("htmlDependency shouldn't be called from a namespace environment", 
            " with absolute paths (or paths from system.file()).", 
            " See ?htmlDependency for more information.")
    }
    version <- as.character(version)
    validateScalarName(name)
    validateScalarName(version)
    srcNames <- names(src)
    if (is.null(srcNames)) 
        srcNames <- rep.int("", length(src))
    srcNames[!nzchar(srcNames)] <- "file"
    names(src) <- srcNames
    src <- as.list(src)
    structure(class = "html_dependency", list(name = name, version = as.character(version), 
        src = src, meta = meta, script = script, stylesheet = stylesheet, 
        head = head, attachment = attachment, all_files = all_files))
}
<environment: namespace:htmltools>


> packageVersion("htmltools")
[1] β€˜0.3.5’

And

> devtools::session_info()
─ Session info ──────────────────────────────────────────────────────────────────────────────────────────
 setting  value                       
 version  R version 3.3.3 (2017-03-06)
 os       OS X Yosemite 10.10.5       
 system   x86_64, darwin13.4.0        
 ui       RStudio                     
 language (EN)                        
 collate  fr_FR.UTF-8                 
 ctype    fr_FR.UTF-8                 
 tz       Europe/Paris                
 date     2018-11-11                  

─ Packages ──────────────────────────────────────────────────────────────────────────────────────────────
 package        * version  date       lib source        
 assertthat       0.2.0    2017-04-11 [1] CRAN (R 3.3.2)
 backports        1.1.2    2017-12-13 [1] CRAN (R 3.3.2)
 base64enc        0.1-3    2015-07-28 [1] CRAN (R 3.3.0)
 bindr            0.1.1    2018-03-13 [1] CRAN (R 3.3.2)
 bindrcpp       * 0.2.2    2018-03-29 [1] CRAN (R 3.3.2)
 callr            3.0.0    2018-08-24 [1] CRAN (R 3.3.2)
 cli              1.0.1    2018-09-25 [1] CRAN (R 3.3.2)
 colorspace       1.3-1    2016-11-18 [1] CRAN (R 3.3.2)
 crayon           1.3.4    2017-09-16 [1] CRAN (R 3.3.2)
 crosstalk        1.0.0    2016-12-21 [1] CRAN (R 3.3.2)
 data.table       1.10.4-3 2017-10-27 [1] CRAN (R 3.3.2)
 desc             1.2.0    2018-05-01 [1] CRAN (R 3.3.2)
 devtools         2.0.1    2018-10-26 [1] CRAN (R 3.3.2)
 digest           0.6.13   2017-12-14 [1] CRAN (R 3.3.2)
 dplyr          * 0.7.8    2018-11-10 [1] CRAN (R 3.3.2)
 fs               1.2.6    2018-08-23 [1] CRAN (R 3.3.2)
 ggplot2        * 3.1.0    2018-10-25 [1] CRAN (R 3.3.2)
 glue             1.3.0    2018-07-17 [1] CRAN (R 3.3.2)
 gtable           0.2.0    2016-02-26 [1] CRAN (R 3.3.0)
 hms              0.4.2    2018-03-10 [1] CRAN (R 3.3.2)
 htmltools      * 0.3.5    2016-03-21 [1] CRAN (R 3.3.0)
 htmlwidgets      0.8      2016-11-09 [1] CRAN (R 3.3.2)
 httpuv           1.4.5    2018-07-19 [1] CRAN (R 3.3.2)
 httr             1.3.1    2017-08-20 [1] CRAN (R 3.3.2)
 jsonlite         1.5      2017-06-01 [1] CRAN (R 3.3.2)
 later            0.7.5    2018-09-18 [1] CRAN (R 3.3.2)
 lattice          0.20-34  2016-09-06 [1] CRAN (R 3.3.3)
 lazyeval         0.2.0    2016-06-12 [1] CRAN (R 3.3.0)
 leaflet        * 2.0.2    2018-08-27 [1] CRAN (R 3.3.2)
 magrittr         1.5      2014-11-22 [1] CRAN (R 3.3.0)
 memoise          1.1.0    2017-04-21 [1] CRAN (R 3.3.2)
 mime             0.5      2016-07-07 [1] CRAN (R 3.3.0)
 munsell          0.5.0    2018-06-12 [1] CRAN (R 3.3.2)
 pillar           1.3.0    2018-07-14 [1] CRAN (R 3.3.2)
 pipeR          * 0.6.1.3  2016-04-04 [1] CRAN (R 3.3.0)
 pkgbuild         1.0.2    2018-10-16 [1] CRAN (R 3.3.2)
 pkgconfig        2.0.2    2018-08-16 [1] CRAN (R 3.3.2)
 pkgload          1.0.2    2018-10-29 [1] CRAN (R 3.3.2)
 plotly         * 4.5.6    2016-11-12 [1] CRAN (R 3.3.2)
 plyr             1.8.4    2016-06-08 [1] CRAN (R 3.3.0)
 prettyunits      1.0.2    2015-07-13 [1] CRAN (R 3.3.0)
 processx         3.2.0    2018-08-16 [1] CRAN (R 3.3.2)
 promises         1.0.1    2018-04-13 [1] CRAN (R 3.3.2)
 ps               1.2.1    2018-11-06 [1] CRAN (R 3.3.2)
 purrr            0.2.4    2017-10-18 [1] CRAN (R 3.3.2)
 R6               2.3.0    2018-10-04 [1] CRAN (R 3.3.2)
 rAmCharts      * 2.1.8    2018-06-21 [1] CRAN (R 3.3.2)
 RColorBrewer     1.1-2    2014-12-07 [1] CRAN (R 3.3.0)
 Rcpp             0.12.19  2018-10-01 [1] CRAN (R 3.3.2)
 readr          * 1.1.1    2017-05-16 [1] CRAN (R 3.3.2)
 remotes          2.0.2    2018-10-30 [1] CRAN (R 3.3.2)
 reshape2         1.4.2    2016-10-22 [1] CRAN (R 3.3.0)
 rlang            0.3.0.1  2018-10-25 [1] CRAN (R 3.3.2)
 rprojroot        1.3-2    2018-01-03 [1] CRAN (R 3.3.2)
 rsconnect        0.8.8    2018-03-09 [1] CRAN (R 3.3.2)
 rstudioapi       0.7      2017-09-07 [1] CRAN (R 3.3.2)
 scales           1.0.0    2018-08-09 [1] CRAN (R 3.3.2)
 sessioninfo      1.1.1    2018-11-05 [1] CRAN (R 3.3.2)
 shiny          * 1.2.0    2018-11-02 [1] CRAN (R 3.3.2)
 shinydashboard * 0.7.1    2018-10-17 [1] CRAN (R 3.3.2)
 shinythemes    * 1.1.1    2016-10-12 [1] CRAN (R 3.3.0)
 sourcetools      0.1.5    2016-09-15 [1] CRAN (R 3.3.0)
 stringi          1.1.2    2016-10-01 [1] CRAN (R 3.3.0)
 stringr          1.1.0    2016-08-19 [1] CRAN (R 3.3.0)
 testthat         2.0.1    2018-10-13 [1] CRAN (R 3.3.2)
 tibble           1.4.2    2018-01-22 [1] CRAN (R 3.3.2)
 tidyr            0.6.0    2016-08-12 [1] CRAN (R 3.3.0)
 tidyselect       0.2.5    2018-10-11 [1] CRAN (R 3.3.2)
 usethis          1.4.0    2018-08-14 [1] CRAN (R 3.3.2)
 viridisLite      0.3.0    2018-02-01 [1] CRAN (R 3.3.2)
 withr            2.1.2    2018-03-15 [1] CRAN (R 3.3.2)
 xtable           1.8-2    2016-02-05 [1] CRAN (R 3.3.0)
 yaml             2.1.14   2016-11-12 [1] CRAN (R 3.3.2)
 zoo              1.8-3    2018-07-16 [1] CRAN (R 3.3.2)

[1] /Library/Frameworks/R.framework/Versions/3.3/Resources/library

Interesting! So it looks to me like, even though shiny 1.2.0 says it only requires htmltools >= 0.3.5, and shinydashboard only requires htmltools >= 0.2.6, you may need a newer version of htmltools. I'm not sure exactly what package this dependency reference bug might be in... maybe Shiny? In any case, try install.packages("htmltools"), followed by packageVersion("htmltools"). It should give you 0.3.6 (the latest from CRAN). I have 0.3.6 installed and htmlDependency has a package parameter in my environment. Hopefully this should resolve the issue for you!

1 Like

Yep! Found the bug in the shiny package and submitted an issue for tracking here:

Thanks for reporting!

3 Likes