I developed a Shiny app using the renv package for my RStudio Project, and when I try to deploy to RStudioConnect, it takes a very long time before failing (too many files in app directory, probably related to renv). I was wondering what the recommended workflow is for publishing renv-managed Shiny apps to RStudioConnect? Thanks!
Are you using the development version of rsconnect? If not, you can install it with:
renv::install("rstudio/rsconnect")
Note that rsconnect still uses Packrat behind the scenes for deployments, but the latest development version of rsconnect ensures that the renv directory does not become part of the application bundle.
Your deployment failing in this way suggests you are still using a version of rsconnect that is not new enough. As @kevinushey mentioned, you need to use renv::install("rstudio/rsconnect") or remotes::install_github("rstudio/rsconnect") to install the development version of the package (version 0.8.15-9000 at the time of writing).
That should resolve your issue. rsconnect had to be taught how to ignore the renv folder, which is your .libPath() and so presents a bit of trouble.
Thanks @cole . Updating to 0.8.15-9000 helped for ignoring the renv/ folder during deployment. However, now I'm running into this issue during deployment: