Deployment failure / pakage version conflict


I am trying to deploy a Shiny app on our RstudioConnect server, but the deployment fails with the following error:

Package ‘tibble’ version 1.4.2 cannot be unloaded:
Error in unloadNamespace(package) : namespace ‘tibble’ is imported by ‘ggplot2’, ‘dplyr’ so cannot be unloaded

Not exactly sure where this conflict comes from, since my local version of tibble is 2.1.3

R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17134)

Matrix products: default

[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] grid      stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] shiny_1.4.0         ggplot2_3.2.1       tidyr_1.0.0         dplyr_0.8.3         flextable_0.5.6    
 [6] formattable_0.2.0.1 reshape_0.8.8       shinythemes_1.1.2   matrixStats_0.55.0  nleqslv_3.3.2      

loaded via a namespace (and not attached):
 [1] tidyselect_0.2.5  xfun_0.11         purrr_0.3.3       colorspace_1.4-1  vctrs_0.2.0       htmltools_0.4.0  
 [7] base64enc_0.1-3   rlang_0.4.1       later_1.0.0       pillar_1.4.2      withr_2.1.2       glue_1.3.1       
[13] gdtools_0.2.1     uuid_0.1-2        lifecycle_0.1.0   plyr_1.8.4        munsell_0.5.0     gtable_0.3.0     
[19] zip_2.0.4         htmlwidgets_1.5.1 evaluate_0.14     knitr_1.26        fastmap_1.0.1     httpuv_1.5.2     
[25] curl_4.2          Rcpp_1.0.3        xtable_1.8-4      scales_1.1.0      openssl_1.4.1     promises_1.1.0   
[31] backports_1.1.5   jsonlite_1.6      mime_0.7          systemfonts_0.1.1 askpass_1.1       packrat_0.5.0    
[37] digest_0.6.22     tools_3.5.1       magrittr_1.5      lazyeval_0.2.2    tibble_2.1.3      crayon_1.3.4     
[43] pkgconfig_2.0.3   zeallot_0.1.0     rsconnect_0.8.15  data.table_1.12.6 xml2_1.2.2        assertthat_0.2.1 
[49] rmarkdown_1.17    officer_0.3.6     rstudioapi_0.10   R6_2.4.1          compiler_3.5.1   

Below is the list of libraries used in the Shiny app:


This seems related to the following closed issues:


Interesting error! Thanks for reporting!! It sounds like something strange is going on in the library!

Can you share the full deployment log for when you upload to RStudio Connect? And do you know what version of RStudio Connect you are using?

Also, if you can execute rsconnect::writeManifest() on the directory you are deploying, the manifest.json should give us a nice picture of what is getting sent to Connect! (Alternatively, you can download and unpack the "bundle" from Connect to look at the manifest.json file that you actually sent. It's pretty big, so RStudio Community may not allow you to upload :face_with_head_bandage: But GitHub gists are an easy way to share such files if that works for you!