简体   繁体   中英

shiny app deployed in 2018 on shinyapps.io not working locally in 2019

I worked on a historical slavery map shiny app project during 2018 period.

My shiny app whas deployed on shinyapps.io with success. You can have a look to my project here

Today, I want to upgrade my app but unfortunately the UI is not working locally (white screen, no modal window, etc... here )

I download my app bundle from Shinyapps.io to use packrat and isolated packages versions used in 2018 without sucess. It's not clear to me how to do this. In Rstudio in Packages > Packrat > Options project > local repositories field. Do I have to indicate the path of the packrat folder of the bundle?

在此处输入图片说明

Here are the packages used in the map

library(shiny)
library(shinyWidgets)
library(leaflet)
library(dplyr)
library(dygraphs)
library(DT)
library(readr)
library(shinyjs)
library(shinyBS)
library(htmltools)
library(bsplus)
library(leaflet.extras)
library(dplyr)
library(tidyr)
library(readxl)

My shinyapps bundle tar is on my github here

packrat.int() should take care of all paths. However, I think the problem is the bsModal function from the shinybs package. If you comment this part of the code in your app it works.

 shinyBS::bsModal(
    id = "startupModal",
    trigger = "",
    size = "large",
    tags$style(type = "text/css", "a { font-size: 12px; }"),
    tags$style(type = "text/css", "p { font-size: 12px; font-weight: bold; margin-bottom: 0px; }"),
    tags$style(type = "text/css", "hr { height: 1px;background: #8c8c8c; opacity: 1;}"),
    tags$h1("Principaux lieux de la traite atlantique"),
    tags$h4("Port de départ des expéditions, lieux d'achat et de débarquement des esclaves"),
    tags$h5("Lorem ipsum dolor sit amet, Phasellus vitae risus at mi semper accumsan. Vestibulum ullamcorper est quis nulla rutrum, non laoreet urna placerat. Praesent volutpat elit quam, egestas faucibus leo vulputate eget. Cras sit amet magna justo. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec lobortis elit eget tempus feugiat. Praesent nec cursus odio. Vivamus ornare eget ipsum a interdum. Curabitur convallis feugiat nulla, eget sodales lorem molestie ut. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam aliquet placerat lorem, id placerat orci auctor commodo. In metus lorem, ullamcorper volutpat congue in, tristique ac orci. Integer sed magna sed nisl maximus placerat. Vivamus nec eleifend nisi. Cras molestie sagittis tempor. Quisque quis sagittis massa."),
    tags$hr(),
    tags$p("Source des données  :  "), tags$a(class = "lien", href = "http://www.slavevoyages.org/", "The Trans-Atlantic Slave Trade Database (2010), Emory University, Données historiques (Domaine publique) - Données substituées (cc by-nc)"),
    tags$br(),
    tags$p("Couches cartographiques historiques  : "),
    tags$a("David Rumsey Map Collection", href = "https://www.davidrumsey.com/"),
    tags$br(),
    tags$p("Conception : "),
    tags$a("Wilfrid Cariou (2018)", href = "http://www.histoire.univ-nantes.fr/", "Université de Nantes, Département d'Histoire"),
    tags$br(),
    img(src = "index.jpg", width = "60", align = "left")
  ),

If you look at the broswer JS console press F12 chrome or firefox, you can the error caused by shinybs. It is some , error. However, you can define the modal function outside shiny app

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM