Shiny app works on RStudio but does not deploy

Hello,
I have built a shiny dashboard with Covid19 data for Switzerland. The dashboard works well when I run it from RStudio, but after being deployed I get this:

**An error has occurred
The application failed to start: exited unexpectedly with code 1
Attaching package: ‘dplyr’
The following objects are masked from ‘package:stats’:
    filter, lag
The following objects are masked from ‘package:base’:
    intersect, setdiff, setequal, union
Loading required package: ggplot2
Attaching package: ‘plotly’
The following object is masked from ‘package:ggplot2’:
    last_plot
The following object is masked from ‘package:stats’:
    filter
The following object is masked from ‘package:graphics’:
    layout
Registered S3 method overwritten by 'quantmod':
  method            from
  as.zoo.data.frame zoo 
── Attaching packages ─────────────────────────────────────── tidyverse 1.3.0 ──
✔ tibble  3.0.3     ✔ stringr 1.4.0
✔ tidyr   1.1.2     ✔ forcats 0.5.0
✔ purrr   0.3.4     
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ plotly::filter() masks dplyr::filter(), stats::filter()
✖ dplyr::lag()     masks stats::lag()
Attaching package: ‘lubridate’
The following objects are masked from ‘package:base’:
    date, intersect, setdiff, union
Linking to GEOS 3.5.1, GDAL 2.2.2, PROJ 4.9.2
Attaching package: ‘maps’
The following object is masked from ‘package:purrr’:
    map
Google's Terms of Service: https://cloud.google.com/maps-platform/terms/.
Please cite ggmap if you use it! See citation("ggmap") for details.
Attaching package: ‘ggmap’
The following object is masked from ‘package:plotly’:
    wind
Attaching package: ‘shinydashboard’
The following object is masked from ‘package:graphics’:
    box
Attaching package: ‘rsconnect’
The following object is masked from ‘package:shiny’:
    serverInfo
Parsed with column specification:
cols(
  date = col_date(format = ""),
  time = col_time(format = ""),
  abbreviation_canton_and_fl = col_character(),
  ncumul_tested = col_double(),
  ncumul_conf = col_double(),
  new_hosp = col_double(),
  current_hosp = col_double(),
  current_icu = col_double(),
  current_vent = col_double(),
  ncumul_released = col_double(),
  ncumul_deceased = col_double(),
  source = col_character(),
  current_isolated = col_double(),
  current_quarantined = col_double(),
  current_quarantined_riskareatravel = col_double(),
  TotalPosTests1 = col_character(),
  ninst_ICU_intub = col_character()
)
Warning: 8254 parsing failures.
row col   expected     actual                                                                                          file
  1  -- 17 columns 15 columns 'https://raw.githubusercontent.com/openZH/covid_19/master/COVID19_Fallzahlen_CH_total_v2.csv'
  2  -- 17 columns 15 columns 'https://raw.githubusercontent.com/openZH/covid_19/master/COVID19_Fallzahlen_CH_total_v2.csv'
  3  -- 17 columns 15 columns 'https://raw.githubusercontent.com/openZH/covid_19/master/COVID19_Fallzahlen_CH_total_v2.csv'
  4  -- 17 columns 15 columns 'https://raw.githubusercontent.com/openZH/covid_19/master/COVID19_Fallzahlen_CH_total_v2.csv'
  5  -- 17 columns 15 columns 'https://raw.githubusercontent.com/openZH/covid_19/master/COVID19_Fallzahlen_CH_total_v2.csv'
... ... .......... .......... .............................................................................................
See problems(...) for more details.
The rnaturalearthhires package needs to be installed.
Installing the rnaturalearthhires package.
Error in value[[3L]](cond) : 
  Failed to install the rnaturalearthhires package.
  Please try installing the package for yourself using the following command: 
     install.packages("rnaturalearthhires", repos = "http://packages.ropensci.org", type = "source")
Calls: local ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted**

It seems like the rnaturalearthhires package is the problem, but I do not need it to build the leaflet maps and tu run the app on RStudio. I have tried to call library(rnaturalearthhires) in the shiny dashboard code and even to add install.packages("rnaturalearthhires", repos = "http://packages.ropensci.org", type = "source"), but it does not work, I get an error message even before the end of deployment. Does anyone had the same problem or know where is the issue? Thanks

1 Like

Hey @vivvi,

Did you got solution for this issue? if yes, please let me know. Even I am facing same issue with other module.

Thank you.