wahani / modules

Modules in R

Home Page:https://cran.r-project.org/package=modules

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shiny app deployment to RStudio Connect fails with package error related to modules

awcm0n opened this issue · comments

I've successfully deployed a modularized Shiny app to RStudio Connect until I received the following error during deployment:

Error: Unable to retrieve package records for the following packages:
- 'constants_module', 'data_module'
In addition: Warning messages:
1: In FUN(X[[i]], ...) :
  Package 'data_module' not available in repository or locally
2: In FUN(X[[i]], ...) :
  Package 'constants_module' not available in repository or locally
Execution halted

The error message refers to two of several modules. I would be very grateful for any suggestion on how to troubleshoot the issue.

Hi. Glad to hear that the package is useful to you!

Can you add some more information to your description. The errors you posted are not raised in the modules package, so it is very difficult to help. If possible add as much information so it gets reproducible.

Thanks for your reply. I wish I could give you any more information but the app runs locally and fails to deploy to RStudio Connect (RSC) with the above error message. RSC identifies and installs package dependencies of a Shiny app using the rsconnect and packrat packages. I'm wondering if recent updates to those packages may have rendered the modules package incompatible with RSC, as some modules in my app are now apparently misidentified as packages. I was just hoping that you might have an idea what could be going on here.

I created a minimal Shiny app that runs locally, but the use of a module within a module prevents deployment to RStudio Connect with the error:

Error: Unable to retrieve package records for the following packages:
- 'constants_module'
In addition: Warning message:
In FUN(X[[i]], ...) :
  Package 'constants_module' not available in repository or locally
Execution halted

test_modules.zip

It seems there might be an environment issue because replacing use() with modules::use() fixed the RStudio Connect deployment issue.

Great, thanks for reporting back!