R Shiny package: shinyjs functions not working

Hi Guys!

I was hoping to get some help on a challenge that I am currently facing.

I just created my first R package for a Shiny app I designed. I watched several tutorials and read the R Package Book by Hadley Wickham and Jenny Bryan.

My app launches correctly and all the features are working, except the ones I used from the package ShinyJs (reset and alert)

For example, I used the shinyjs::reset function, but none of my reset buttons are working. I get no error messages when clicking any reset buttons in my app.

I am not sure why It is not executing . ( I made sure to @import the library shinyjs in my package)

Has anyone experienced a problem similar to this when creating a package that relies on other existing packages?

Have you remembered to place the useshinyjs function in your ui?

Hi @nirgrahamuk,

Yes I have, I also tested my app before packaging it and everything worked fine.

Now that I have packaged it, the functions from shinyjs do not work.

Here is also a look at how I imported the packages in. Maybe the problem might come from here?

#' @import RMySQL
#' @import shinydashboard
#' @import DBI
#' @importFrom DT dataTableOutput
#' @importFrom DT renderDataTable
#' @importFrom DT datatable
#' @import leaflet
#' @import leaflet.extras
#' @import shinyWidgets
#' @import chipPCR
#' @importFrom shinyjs reset
#' @importFrom shinyjs useShinyjs
#' @importFrom shinyjs alert
#' @import ggplot2
#' @import dplyr
#' @import readxl
#' @import reactable
#' @import writexl
#' @import xfun
#' @import berryFunctions
#' @import backports
#' @import vroom
#' @importFrom htmltools HTML
#' @importFrom readr  read_csv
#' @import plotly

your best bet is to make a minimal package that is as simple as shiny app as you can do, and use shinys for something trivial, then add the rest of your app into it...

1 Like

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.