I'm unable to publish anything to our instance of PositConnect. Starting with a brand new rmarkdown, in a clean project (without renv), I have the following document:
title: test
output: html_document
library(dplyr)
library(ggplot2)
library(tidyr)
I attempt to publish and get the following from Deploy:
── Preparing for deployment ────────────────────────────────────────────────────
Deploying "test" using "server: ********** / username: **********"
Creating application on server...
Created application with id 1180
Bundling 1 file: 'renv_test.Rmd'
Capturing R dependencies with renv
Building R Markdown document...
Bundle created with R version 4.4.1 is compatible with environment Local with R version 4.4.1 from /opt/R/4.4.1/bin/R
Bundle requested R version 4.4.1; using /opt/R/4.4.1/bin/R which has version 4.4.1
Performing manifest.json to packrat transformation.
Found 0 dependencies
Created 428b bundle
Uploading bundle...
Uploaded bundle with id 22776
── Deploying to server ─────────────────────────────────────────────────────────
[rsc-session] Content GUID: **********
[rsc-session] Content ID: **********
[rsc-session] Bundle ID: **********
[rsc-session] Job Key: **********
Running on host: **********
Linux distribution: AlmaLinux release 9.4 (Seafoam Ocelot)
Running as user: uid=988(rstudio-connect) gid=987(rstudio-connect) groups=987(rstudio-connect) context=system_u:system_r:unconfined_service_t:s0
Connect version: 2024.02.0
LANG: C.UTF-8
Working directory: /opt/rstudio-connect/mnt/app
Using R 4.4.1
R.home(): /opt/R/4.4.1/lib/R
Using user agent string: 'RStudio R (4.4.1 x86_64-pc-linux-gnu x86_64 linux-gnu)'
Validating R library read / write permissions --------------------------------
Using R library for packrat bootstrap: /opt/rstudio-connect/mnt/R/4.4.1
Validating managed packrat installation --------------------------------------
Vendored packrat archive: /opt/rstudio-connect/ext/R/packrat_0.9.2.9000_70625806c44bda42a7f3aeaa92ee65542cc590be.tar.gz
Vendored packrat SHA: 70625806c44bda42a7f3aeaa92ee65542cc590be
Managed packrat SHA: 70625806c44bda42a7f3aeaa92ee65542cc590be
Managed packrat version: 0.9.2.9000
Managed packrat is up-to-date.
Validating packrat cache read / write permissions ----------------------------
Using packrat cache directory: /opt/rstudio-connect/mnt/packrat/4.4.1
Setting packrat options and preparing lockfile -------------------------------
Error in [.data.frame
(lockInfo, , "Package") :
undefined columns selected
Calls: -> -> [ -> [.data.frame
Execution halted
Build error: exit status 1
── Deployment complete ─────────────────────────────────────────────────────────
Deployment failed with error: exit status 1
From what I can tell, renv is not finding any dependencies, which is causing the deployment to fail. When I run renv::dependencies, I get the following:
renv::dependencies()
Finding R package dependencies ... Done!
Source Package Require Version Dev
1 C:/Users/jr/renv_test/rsconnect rsconnect FALSE
2 C:/Users/jr/renv_test/renv_test.Rmd rmarkdown FALSE
3 C:/Users/jr/renv_test/renv_test.Rmd dplyr FALSE
4 C:/Users/jr/renv_test/renv_test.Rmd ggplot2 FALSE
5 C:/Users/jr/renv_test/renv_test.Rmd tidyr FALSE
The dependencies are found when calling the function directly, but now while deploying. Any ideas on what may be causing this?