Unable to run shiny app, error: Error in library(dplyr) : there is no package called ‘dplyr’

What I think is going on:
I am using reconnect: deployApp, and within the app.r file, I call 4 libraries: shiny, dplyr, ggplot2, ggthemes. The app works locally. The issue appears to be that the libraries are not being loaded that the app relies on.


  • Cite any error or warning messages: on log, received when opening app
  • Cite your application logs: See below. DPLYR and other packages are called in the beginning of app.r, but are not loaded.
  • Cite output of "rsconnect::appDependencies():

package version source
1 R6 2.5.1 CRAN
2 Rcpp 1.0.10 CRAN
3 base64enc 0.1-3 CRAN
4 bslib 0.4.2 CRAN
5 cachem 1.0.7 CRAN
6 cli 3.6.0 CRAN
7 commonmark 1.8.1 CRAN
8 crayon 1.5.2 CRAN
9 digest 0.6.31 CRAN
10 ellipsis 0.3.2 CRAN
11 fastmap 1.1.1 CRAN
12 fontawesome 0.5.0 CRAN
13 fs 1.6.1 CRAN
14 glue 1.6.2 CRAN
15 htmltools 0.5.4 CRAN
16 httpuv 1.6.9 CRAN
17 jquerylib 0.1.4 CRAN
18 jsonlite 1.8.4 CRAN
19 later 1.3.0 CRAN
20 lifecycle 1.0.3 CRAN
21 magrittr 2.0.3 CRAN
22 memoise 2.0.1 CRAN
23 mime 0.12 CRAN
24 promises CRAN
25 rappdirs 0.3.3 CRAN
26 rlang 1.0.6 CRAN
27 sass 0.4.5 CRAN
28 shiny 1.7.4 CRAN
29 sourcetools 0.1.7-1 CRAN
30 withr 2.5.0 CRAN
31 xtable 1.8-4 CRAN

Error code on log: 2023-03-07T20:21:50.367907+00:00 shinyapps[8504332]: 55:
2023-03-07T20:21:50.367932+00:00 shinyapps[8504332]: 54: stop
2023-03-07T20:21:50.367953+00:00 shinyapps[8504332]: 53: library
2023-03-07T20:21:50.367958+00:00 shinyapps[8504332]: 52: server [/srv/connect/apps/focl2023/app.R#140]
2023-03-07T20:21:50.367963+00:00 shinyapps[8504332]: 15:
2023-03-07T20:21:50.367972+00:00 shinyapps[8504332]: 13: fn
2023-03-07T20:21:50.367976+00:00 shinyapps[8504332]: 8: retry
2023-03-07T20:21:50.367981+00:00 shinyapps[8504332]: 7: connect$retryingStartServer
2023-03-07T20:21:50.367986+00:00 shinyapps[8504332]: 6: eval
2023-03-07T20:21:50.367991+00:00 shinyapps[8504332]: 5: eval
2023-03-07T20:21:50.368001+00:00 shinyapps[8504332]: 4: eval
2023-03-07T20:21:50.368006+00:00 shinyapps[8504332]: 3: eval
2023-03-07T20:21:50.368039+00:00 shinyapps[8504332]: 2: eval.parent
2023-03-07T20:21:50.368059+00:00 shinyapps[8504332]: 1: local
2023-03-07T20:21:50.368065+00:00 shinyapps[8504332]: Error in library(dplyr) : there is no package called ‘dplyr’



if your code includes an explicit library(dplyr) then it is odd that rsconnect is failing to identify that.
One way I could think that things could go wrong with , might be perhaps if you were avoiding using Rstudio's 'project' features. Is your app a project in Rstudio ?

Yes, app is a project in Rstudio, but I am going to try starting a new "shiny" project and see if that works. I worked through the diamonds example by starting a new project, and it worked.

Update: After creating a fresh install (and separating app into UI/server files), it's working on the server. Thanks all for your help. While I don't know why it did not initially work, starting anew made the difference.

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.