I build a shiny app like described here: https://mastering-shiny.org/scaling-packaging.html#sharing
I created a file called app.R
in the root directory of my app/package which includes:
pkgload::load_all()
shiny::shinyApp(ui = appUI(), server = appServer)
When I run this file locally, everything works. devtools::check()
also works and has neither errors, warnings or notes.
When I try to deploy the app to shinyapps.io, the app fails to start with exit status 1
.
The log say:
2023-07-28T09:48:36.451088+00:00 shinyapps[9468757]: Shiny application starting ...
2023-07-28T09:48:36.493514+00:00 shinyapps[9468757]: Warning in loadSupport(appDir, renv = sharedEnv, globalrenv = NULL) :
2023-07-28T09:48:36.493552+00:00 shinyapps[9468757]: Loading R/ subdirectory for Shiny application, but this directory appears to contain an R package. Sourcing files in R/ may cause unexpected behavior.
2023-07-28T09:48:36.504741+00:00 shinyapps[9468757]: in method for ‘as.data.frame’ with signature ‘"Routine"’: no definition for class “Routine”
2023-07-28T09:48:36.507915+00:00 shinyapps[9468757]: in method for ‘as.data.frame’ with signature ‘"Pairing"’: no definition for class “Pairing”
2023-07-28T09:48:36.509303+00:00 shinyapps[9468757]: in method for ‘as.data.frame’ with signature ‘"Event"’: no definition for class “Event”
2023-07-28T09:48:36.525215+00:00 shinyapps[9468757]: Error in getClass(Class, where = topenv(parent.frame())) :
2023-07-28T09:48:36.525257+00:00 shinyapps[9468757]: “Event” is not a defined class
2023-07-28T09:48:36.525277+00:00 shinyapps[9468757]: Shiny application exiting ...
2023-07-28T09:48:36.525282+00:00 shinyapps[9468757]: Calls: local ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
2023-07-28T09:48:36.525287+00:00 shinyapps[9468757]: Execution halted
Does anybody know, why I get this error? the class is installed and exported in the NAMESPACE
.