0
votes

I am getting an error

The application failed to start: exited unexpectedly with code 1 Error in enforcePackage(name, curVersion) : The shiny package was not found in the library. Calls: local ... eval -> eval -> eval -> -> enforcePackage Execution halted

when I try to deploy shiny app. I found similar problem that claimed that having library(shiny) solves it, it didn't help. I also tried lib=("path/to/shiny"), no effect.

Here is my code

library(shiny)
library(DT)
library(rmarkdown)

###

ui <- fluidPage(fluidRow(column(10, div(dataTableOutput("dataTable")))))


server <- function(input, output, session) {
    
   
    data <- reactiveFileReader(100, session, 'excel.csv', read.csv)
    
    
  
    
    
    output$dataTable <- renderDT(
        data(),
        class = "display nowrap compact", 
        filter = "top", 
        
        options = list(  
            scrollX = TRUE, 
            
         
            searchCols = default_search_columns,
            search = list(regex = FALSE, caseInsensitive = FALSE, search = default_search)
        )
    )
    
}
shinyApp(ui, server)


rsconnect::deployApp('C:/path//app1.Rmd')

Any help is appreciated.

1

1 Answers

0
votes

The error indicates that Shiny is not installed in the environment you are deploying to.

If deploying to a server you own, first install Shiny Server, and confirm that the examples work as expected.

Then consult with the Administrator's Guide to set it up as you like it.