Shiny can run in local but fail to publish to shinyapps.io

I developped shiny app and it works fine locally. However I got this error when trying to publish to shinyapps.io

Error: Unhandled Exception: Child Task 1216981299 failed: Application mode static not supported.
Execution halted

  1. Do we need to publish library folder as well?
  2. How can I solve this error? My code is posted below.
packages = c('shiny', 'shinythemes', 'wordcloud','dplyr', 'igraph', 'networkD3','visNetwork')

for(p in packages){
  library(p, character.only = T)
}

list <- c("focusgroup" = 1,
          "influencer" = 2
          )
All <- readRDS(file = "All.rds")
All_data <- readRDS(file = "All_data.rds")

data(MisLinks)
data(MisNodes)

#======================= User Interface ======================================#

ui <- fluidPage(theme = shinytheme("darkly"),
             
                titlePanel("Cryptoverse"),
                
                sidebarLayout(
                  sidebarPanel(
                    
                    sliderInput("slider", "Slider",min = Sys.Date() - 365*2, max = Sys.Date(), value =  c(Sys.Date() - 30, Sys.Date()) ),
                    dateRangeInput("daterange", "Input date range", start = Sys.Date() - 30,end = Sys.Date() ),
                    selectInput("selection", "Select group", choices = list, selected = 1),dataTableOutput("table")
                  ),
                  
                  mainPanel(
                    
                    forceNetworkOutput("force"),
                    plotOutput("plot")
                    
                  )
                )
        )
#================================ Server ====================================#

server <- function(input, output, session) {
  # Avoid chain reaction
  reactdelay <- 1
  change_slider <- reactiveVal(Sys.time())
  change_daterange <- reactiveVal(Sys.time())

  observeEvent(input$slider, {
    if (difftime(Sys.time(), change_slider()) > reactdelay) {
      change_daterange(Sys.time())
      updateDateRangeInput(session,
                           "daterange",
                           start = input$slider[[1]],
                           end = input$slider[[2]])
    }
  })

  observeEvent(input$daterange, {
    if (difftime(Sys.time(), change_daterange()) > reactdelay) {
      change_slider(Sys.time())
      updateSliderInput(session,
                        "slider",
                        value = c(input$daterange[[1]], input$daterange[[2]]))
    }
  })

  filtered <- reactive({
    All %>%
      filter(id == input$selection,
             created_at >= as.Date(input$daterange[[1]]),
             created_at <= as.Date(input$daterange[[2]])
      )
  })

  output$plot <- renderPlot({
    wordcloud(filtered()$text, min.freq=50, scale=c(3.5, 0.5), random.order=FALSE, rot.per=0.35, colors=brewer.pal(8, "Dark2"))
  })

  filtered2 <- reactive({
    All_data %>%
      filter(id == input$selection,
             created_at >= as.Date(input$daterange[[1]]),
             created_at <= as.Date(input$daterange[[2]])
      )
  })

  output$table <- renderDataTable({
    table <- filtered2()
    table
  })
  
  output$force <- renderForceNetwork({
    forceNetwork(Links = MisLinks, Nodes = MisNodes,
                 Source = "source", Target = "target",
                 Value = "value", NodeID = "name",
                 Group = "group", opacity = input$opacity)
  })
}
#================================ Engine ====================================#

shinyApp(ui, server)

I've solved this problem by changing the method of calling library as follow.

library(shiny)
library(shinythemes)
library(wordcloud)
library(dplyr)
library(igraph)
library(networkD3)
library(visNetwork)