Flexdashboard not loading when using Leaflet

Hi everyone!

I have recently discovered the leaflet package and Flexdashboard and have no troubles using them separately. However when I try to integrate a leaflet map into my Flexdashboard, nothing happens when I try to run my .Rmd The viewer is stuck with the "Please wait..." screen...

I have tried to simplify everything, leaving nothing more than a few packages and a renderLeaflet line in my code but it still won't load.

When using leaflet with shiny but without Flexdashboard I have no loading problem. Neither when using Flexdashboard with other functions.

Here is my code : (I added some "/" to the backtiles so everything appears in a readable block)

---
title: "Untitled"
output: 
  flexdashboard::flex_dashboard:
    orientation: columns
    vertical_layout: fill
  runtime: shiny 
---

```{r setup, include=FALSE}
library(flexdashboard)
library(tidyverse)
library(leaflet)
library(shiny)
```/

Column {data-width=500}
-----------------------------------------------------------------------
```{r}
renderLeaflet({leaflet() %>%
                addTiles()
              })
```/

I don't get anything after waiting for a while, not even an error message. Did I miss something? Is there an update that I should be looking for?

Thank you for your help

Make sure the YAML header has the correct indentation:

---
title: "Untitled"
output: 
    flexdashboard::flex_dashboard:
        orientation: columns
vertical_layout: fill
runtime: shiny 
---

I'm able to see the map on my end so I have also included my packages info so you can check if you're on the same versions for the required packages.

Package Info
package       * version    date       lib source                          
 assertthat      0.2.1      2019-03-21 [1] RSPM (R 3.5.2)                  
 backports       1.1.4      2019-04-10 [1] RSPM (R 3.5.2)                  
 base64enc       0.1-3      2015-07-28 [1] RSPM (R 3.5.0)                  
 BH              1.69.0-1   2019-01-07 [1] RSPM (R 3.5.2)                  
 broom           0.5.0      2018-07-17 [1] RSPM (R 3.5.0)                  
 callr           3.1.1      2018-12-21 [1] RSPM (R 3.5.0)                  
 cellranger      1.1.0      2016-07-27 [1] RSPM (R 3.5.0)                  
 cli             1.1.0      2019-03-19 [1] RSPM (R 3.5.2)                  
 clipr           0.5.0      2019-01-11 [1] RSPM (R 3.5.0)                  
 colorspace      1.3-2      2016-12-14 [1] RSPM (R 3.5.0)                  
 crayon          1.3.4      2017-09-16 [1] RSPM (R 3.5.0)                  
 crosstalk       1.0.0      2016-12-21 [1] RSPM (R 3.5.0)                  
 curl            3.2        2018-03-28 [1] RSPM (R 3.5.0)                  
 DBI             1.0.0      2018-05-02 [1] RSPM (R 3.5.0)                  
 dbplyr          1.3.0      2019-01-09 [1] RSPM (R 3.5.2)                  
 digest          0.6.21     2019-09-20 [1] RSPM (R 3.5.3)                  
 dplyr           0.8.3      2019-07-04 [1] RSPM (R 3.5.2)                  
 ellipsis        0.2.0.1    2019-07-02 [1] RSPM (R 3.5.2)                  
 evaluate        0.14       2019-05-28 [1] RSPM (R 3.5.2)                  
 fansi           0.4.0      2018-10-05 [1] RSPM (R 3.5.2)                  
 fastmap         1.0.1      2019-10-08 [1] RSPM (R 3.5.3)                  
 flexdashboard   0.5.1.1    2018-06-29 [1] RSPM (R 3.5.2)                  
 forcats         0.4.0      2019-02-17 [1] RSPM (R 3.5.2)                  
 fs              1.2.6      2018-08-23 [1] RSPM (R 3.5.0)                  
 ggplot2         3.2.0      2019-06-16 [1] RSPM (R 3.5.2)                  
 glue            1.3.1      2019-03-12 [1] RSPM (R 3.5.2)                  
 gridExtra       2.3        2017-09-09 [1] RSPM (R 3.5.2)                  
 gtable          0.2.0      2016-02-26 [1] RSPM (R 3.5.0)                  
 haven           2.1.0      2019-02-19 [1] RSPM (R 3.5.2)                  
 highr           0.8        2019-03-20 [1] RSPM (R 3.5.2)                  
 hms             0.4.2      2018-03-10 [1] RSPM (R 3.5.2)                  
 htmltools       0.4.0      2019-10-04 [1] CRAN (R 3.5.3)                  
 htmlwidgets     1.5.1      2019-10-08 [1] RSPM (R 3.5.3)                  
 httpuv          1.5.2      2019-09-11 [1] RSPM (R 3.5.3)                  
 httr            1.3.1      2017-08-20 [1] RSPM (R 3.5.0)                  
 jsonlite        1.6        2018-12-07 [1] RSPM (R 3.5.2)                  
 knitr           1.23       2019-05-18 [1] RSPM (R 3.5.2)                  
 labeling        0.3        2014-08-23 [1] RSPM (R 3.5.0)                  
 later           1.0.0      2019-10-04 [1] RSPM (R 3.5.3)                  
 lattice         0.20-38    2018-11-04 [2] CRAN (R 3.5.3)                  
 lazyeval        0.2.1      2017-10-29 [1] RSPM (R 3.5.0)                  
 leaflet         2.0.2      2018-08-27 [1] RSPM (R 3.5.2)                  
 lubridate       1.7.4      2018-04-11 [1] RSPM (R 3.5.0)                  
 magrittr        1.5        2014-11-22 [1] RSPM (R 3.5.0)                  
 markdown        1.0        2019-06-07 [1] RSPM (R 3.5.2)                  
 MASS            7.3-51.1   2018-11-01 [2] CRAN (R 3.5.3)                  
 Matrix          1.2-15     2018-11-01 [2] CRAN (R 3.5.3)                  
 mgcv            1.8-27     2019-02-06 [2] CRAN (R 3.5.3)                  
 mime            0.7        2019-06-11 [1] RSPM (R 3.5.2)                  
 modelr          0.1.4      2019-02-18 [1] RSPM (R 3.5.2)                  
 munsell         0.5.0      2018-06-12 [1] RSPM (R 3.5.0)                  
 nlme            3.1-137    2018-04-07 [2] CRAN (R 3.5.3)                  
 openssl         1.0.2      2018-07-30 [1] RSPM (R 3.5.0)                  
 pillar          1.4.2      2019-06-29 [1] RSPM (R 3.5.2)                  
 pkgconfig       2.0.2      2018-08-16 [1] RSPM (R 3.5.2)                  
 plogr           0.2.0      2018-03-25 [1] RSPM (R 3.5.0)                  
 plyr            1.8.4      2016-06-08 [1] RSPM (R 3.5.0)                  
 png             0.1-7      2013-12-03 [1] RSPM (R 3.5.2)                  
 processx        3.3.0      2019-03-10 [1] RSPM (R 3.5.2)                  
 promises        1.1.0      2019-10-04 [1] RSPM (R 3.5.3)                  
 ps              1.3.0      2018-12-21 [1] RSPM (R 3.5.0)                  
 purrr           0.3.2      2019-03-15 [1] RSPM (R 3.5.2)                  
 R6              2.4.0      2019-02-14 [1] RSPM (R 3.5.2)                  
 raster          2.8-19     2019-01-30 [1] RSPM (R 3.5.2)                  
 RColorBrewer    1.1-2      2014-12-07 [1] RSPM (R 3.5.0)                  
 Rcpp            1.0.2      2019-07-25 [1] CRAN (R 3.5.2)                  
 readr           1.3.1      2018-12-21 [1] CRAN (R 3.5.0)                  
 readxl          1.1.0      2018-04-20 [1] RSPM (R 3.5.0)                  
 rematch         1.0.1      2016-04-21 [1] RSPM (R 3.5.0)                  
 reprex          0.2.1      2018-09-16 [1] RSPM (R 3.5.0)                  
 reshape2        1.4.3      2017-12-11 [1] RSPM (R 3.5.0)                  
 rlang           0.4.0      2019-06-25 [1] RSPM (R 3.5.2)                  
 rmarkdown       1.14       2019-07-12 [1] RSPM (R 3.5.2)                  
 rstudioapi      0.10       2019-03-19 [1] RSPM (R 3.5.3)                  
 rvest           0.3.2      2016-06-17 [1] RSPM (R 3.5.0)                  
 scales          1.0.0      2018-08-09 [1] RSPM (R 3.5.0)                  
 selectr         0.4-1      2018-04-06 [1] RSPM (R 3.5.0)                  
 shiny           1.4.0      2019-10-10 [1] CRAN (R 3.5.3)                  
 sourcetools     0.1.7      2018-04-25 [1] RSPM (R 3.5.0)                  
 sp              1.3-1      2018-06-05 [1] RSPM (R 3.5.2)                  
 stringi         1.4.3      2019-03-12 [1] RSPM (R 3.5.2)                  
 stringr         1.4.0      2019-02-10 [1] RSPM (R 3.5.2)                  
 tibble          2.1.3      2019-06-06 [1] RSPM (R 3.5.2)                  
 tidyr           0.8.3.9000 2019-07-24 [1] Github (tidyverse/tidyr@d72baa7)
 tidyselect      0.2.5      2018-10-11 [1] RSPM (R 3.5.2)                  
 tidyverse       1.2.1      2017-11-14 [1] RSPM (R 3.5.2)                  
 tinytex         0.14       2019-06-25 [1] RSPM (R 3.5.2)                  
 utf8            1.1.4      2018-05-24 [1] RSPM (R 3.5.0)                  
 vctrs           0.2.0      2019-07-05 [1] RSPM (R 3.5.2)                  
 viridis         0.5.1      2018-03-29 [1] RSPM (R 3.5.2)                  
 viridisLite     0.3.0      2018-02-01 [1] RSPM (R 3.5.0)                  
 whisker         0.3-2      2013-04-28 [1] RSPM (R 3.5.0)                  
 withr           2.1.2      2018-03-15 [1] RSPM (R 3.5.0)                  
 xfun            0.8        2019-06-25 [1] RSPM (R 3.5.2)                  
 xml2            1.2.0      2018-01-24 [1] RSPM (R 3.5.0)                  
 xtable          1.8-2      2016-02-05 [1] RSPM (R 3.5.0)                  
 yaml            2.2.0      2018-07-25 [1] RSPM (R 3.5.0)                  
 zeallot         0.1.0      2018-01-28 [1] RSPM (R 3.5.2)

You just saved my whole project, thank you.
I updated some packages and it worked!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.