Problems to deploy app to after update rsconnect package

Hello everyone,

I have a serious problem at deploy an app after I update rsconnect package. R told me to update the package and when I want to deploy the app I get the next message:

── Preparing for deployment ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
:heavy_check_mark: Re-deploying "PanelQPE" to "server: / username: "
:information_source: Looking up application with id "6385920"...
:heavy_check_mark: Found application
:information_source: Bundling 6341 files: ajuste_v0.1/Ajuste_20220101_D110_E2.0.png, ajuste_v0.1/Ajuste_20220102_D110_E1.0.png, ajuste_v0.1/Ajuste_20220103_D110_E3.0.png, ajuste_v0.1/Ajuste_20220104_D140_E1.0.png, ajuste_v0.1/Ajuste_20220105_D110_E0.5.png, ajuste_v0.1/Ajuste_20220106_D100_E1.5.png, ajuste_v0.1/Ajuste_20220107_D150_E0.5.png, ajuste_v0.1/Ajuste_20220108_D140_E0.5.png, ajuste_v0.1/Ajuste_20220109_D100_E0.5.png, ajuste_v0.1/Ajuste_20220110_D120_E0.5.png, ajuste_v0.1/Ajuste_20220111_D140_E1.5.png, ajuste_v0.1/Ajuste_20220112_D120_E3.0.png, ajuste_v0.1/Ajuste_20220113_D100_E0.5.png, ajuste_v0.1/Ajuste_20220114_D140_E1.0.png, ajuste_v0.1/Ajuste_20220115_D140_E1.0.png, ajuste_v0.1/Ajuste_20220116_D100_E3.0.png, ajuste_v0.1/Ajuste_20220117_D100_E1.5.png, ajuste_v0.1/Ajuste_20220118_D220_E2.0.png, …, ID-redes.txt, and log-prueba-panelQPE.txt
:information_source: Capturing R dependencies with renv
Error in dirname(root) : a character vector is expected as argument

Could you help me to solve this problem?

Thank you very much!


Hello Lorena,

I recently had the same issue; had to update rsconnect and was catching errors. Here is how I fixed it:

  1. Ran renv::install("path/to/GitHub/Repo")
  2. Ran renv::refresh()
  3. Ran renv::init()

I then tried publishing again, and RStudio prompted me to make a few updates. I made them, and it worked.

Also, maybe running renv::status() will help you diagnose issues. Hope this helps!


Thanks John. I didn't have at that moment the renv defined. Now yes and it is working. But I am having an issue with the time it takes to load the app, because I make a deploy of the app everyday. So everyday, when you load the app, it takes a long time to download and install all the packages defined in the renv.

Do you know how to manage better the app?

Thank you,