there is no package called ‘ggplot2’ error

I had a working shiny app, that shows some ggplot density plots based on query data. now I extended it with some new scales, and it works locally on my pc, (win10, R 4.0.4, Rstudio 1.4.1106, shiny package v1.6.0) but after uploading to the shiny server I receive this error: "there is no package called ‘ggplot2’" which is utterly weird as right before uploading the new version, the old version worked properly on the server too. I use the same packages in the new version, there were no dramatic changes done, so I am really puzzled now.

this is more puzzling now, I went back to the old version, and it still works properly, while the new app not although it has the same packages, same structure, everything... I even tried to upload it as a new app instead of overwriting the old one, but got the same error... I really don't understand what is going on.

Did you find a solution? I am having the same issue after the same trouble shooting steps with shinyapps.io. App was deployed fine last week. Tonight, added library(ggplot2) and a plot and now no dice. I tried deleting and redeploying as well as using library(tidyverse) and explicitly calling the plot ggplot2::ggplot() %>%.

I solved my issue, not sure if this is helpful to any future users with the same issue. I had created a DESCRIPTION FILE per the Mastering Shiny book and didn't realize that I needed to make sure any packages I used in the app were also listed under "Imports" in the DESCRIPTION file. :man_facepalming:

1 Like

Hi there! In my case, the problem was that there were variable names in the dataset with Hungarian accented characters. I got rid of those and the app started to work.