-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] App not deploying on Shiny Server #1135
Comments
@VincentGuyader @ColinFay Do you have an ideas on what could be going wrong? |
hi, I use renv a lot, but not for shinyserver (although that shouldn't matter). Have you managed to use shinyserver + renv + a simple app.R (outside of golem, I mean)? Regards |
Many thanks for your response @VincentGuyader My company has a new server. The old server would not deploy the App until I used renv (then it worked for the golem app). When I add I can say the following after further testing:
Many thanks EDIT: Another interesting observation: shinyserver + simple app.R + renv with library(golem) in app.R. Once I call |
@VincentGuyader I think I have found the source of the bug. You should be able to reproduce this. THE BUG: when initiating renv inside a golem project an renv folder is created inside the project without a library. Instead, the library is created in the cache directory '/home/myuser/.cache/R/renv/library/myproject'. This does not happen with a simple shiny app.R (outside of Golem). This leads me with two questions:
Many thanks |
Found the answer here. I had to specify my RENV_PATHS_LIBRARY in project .Renviron. I wonder why I had to do this in the first place? Why was this not the default and the .cache directory was? |
Describe the bug
I am attempting to deploy my app on a company hosted shiny server with renv to isolate the environment.
Apps which are not developed with the golem framework are deploying fine, whereas any App built with the golem framework does not deploy.
The app runs with
golem::run_dev()
.In my log file it states there is no package called
jsonlite
but I have installedjsonlite
withinstall.packages()
and I can see it in the renv lock file.To reproduce
New golem project. Install with standard instructions here.
Navigate to
03_deploy.R
. No errors withdevtools::check()
. Package installed withdevtools::install()
and is able to run withrun_app()
. I am using the shinyserver file functiongolem::add_shinyserver_file()
.Initiate renv with
renv::init()
, isolate and restore withrenv::isolate()
andrenv::restore()
respectively.Session Info
haliTest4_0.0.0.9000
is the name of the App.log
The text was updated successfully, but these errors were encountered: