Hello,
I am trying to publish a Shiny app to Posit Connect which depends on a local R package (internal_package
) not available on CRAN. It is included in the project bundle.
I am following this route because I do not have the access to create the connection between Posit Connect and GitHub. I also have limited visibility of the back end where administrative settings are configured.
This prevents me from
a) hosting my package on a CRAN-like GitHub repo and adding this to repos
in .Rprofile
.
b) installing via remotes::install_github("mycompany/internal_package")
The core issue with a local package installation is that Posit Connect looks for the package on CRAN, where it does not exist.
I have tried several approaches including
- an installation script that is sourced in app.R
- adjusting the renv.lock file to point to a local repo
packages/
What is the recommended approach to ensure that Posit Connect can use a local package included in the project bundle given my constraints?
App structure:
my_app/
├── app.R
├── renv.lock
├── .Rprofile
├── renv/
└── packages/
└── src/
└── contrib/
├── PACKAGES
├── PACKAGES.gz
└── internal_package_0.1.0.tar.gz
Thanks