RStudioConnect deployments with the renv package


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:


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.


I've updated to rsconnect 0.8.15, but am still running into this following warning (note our Connect version is still on v1.7.0):


Do I need to uncheck the renv folder when deploying from RStudio?


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.

1 Like

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:

I suspect this is due to the line that is added by renv in the .Rprofile file. Should I just ignore the .Rprofile file when deploying?

Ah yes, definitely. You almost always want to exclude the .Rprofile from deployments, lest it do something strange to the deployment process.

Glad to hear you got it working though!!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.