ebailey78 / shinyBS

Twitter Bootstrap Components for Shiny
182 stars 47 forks source link

Dependencies failed to load #142

Open StatisMike opened 2 years ago

StatisMike commented 2 years ago

I'm developing a shinyApp, in which I use shinyBS mostly for popovers (created in renderUI, as they are used on dynamically generated lists). There seem to be a problem with attaching the dependencies from the package.

I've even added a bsButton (mainly to add these dependecies) to the static UI, but to no avail (it sometimes attaches the dependencies, but mostly I've got 404 error for both shinyBS.css and shinyBS.js).

I should add that the app I am developing is based on golem framework.

What worked for me is to add dependencies manually, using within tags$head:

    htmltools::htmlDependency("shinyBS",
                              version = "0.61.1",
                              src = "www",
                              script = "shinyBS.js",
                              stylesheet = "shinyBS.css",
                              all_files = T,
                              package = "shinyBS")

I think there could be an addition of function like shinyjs::useShinyjs(), waiter::use_waiter() etc, solely for explicitly attaching the dependencies in the UI head of the application, to remedy this kind of issues

nik-humphries commented 1 year ago

Encountered this exact issue and your fix helped me. Took a while to identify what was wrong though!