Shiny could not find "dygraphOutput"

Hi everyone! I have a problem when I create the Shiny app. It works perfectly fine when I hit Run App (it runs fine in the browser). However, I get the following error when I try to put it in It remains "running" in Both the error sign from and the code is below. Thanks in advance.

Error in value[3L] : could not find function "dygraphOutput"
Calls: local ... tryCatch -> tryCatchList -> tryCatchOne ->
Execution halted

server<-function(input, output) {output$Sears_Amazon<-
renderDygraph({dygraph(Sears_Amazon) %>% dyRangeSelector()})}

shinyApp(ui = ui, server = server)

Determine what package supplies that function, and check that its mentioned in your code by library or required statement

Thanks so much. I have accessed out of the library() in the regular console, but am learning that I need to do it in ui.r and /or server.R. Do you or anyone else know exactly how to do that. I use Rstudio regularly, but first time with shiny.

All the best!