Hi there I am hoping that someone on the forum here can help me. I am trying to deploy a flexdashboard app via Shinny Apps everything is going until I get this error.
Error: Unhandled Exception: Child Task 1318228447 failed: Error building image: Error fetching rstan (2.26.22) source. unable to satisfy package: rstan (2.26.22).
Does anyone have a workaround for this?
The latest version of rstan
on CRAN is 2.21.8 (cf. CRAN - Package rstan)
rstan
2.26.22 is only available on a bespoke repository outside of CRAN.
Did you - prior to publishing - set the repos so that at least one points to the stan repo as referenced in Repository for distributing (some) stan-dev R packages | r-packages, i.e.
repos <- c(Stan = "https://mc-stan.org/r-packages/", CRAN = "https://cloud.r-project.org")
options(repos = repos)
Thanks for the quick response I actually went ahead removed that version of "rstan' and installed the version from Cran but now I have a different problem, no matter what I do whenever I try to deploy the app, it keeps timing out. It is stuck on trying install rstan.
Preparing to deploy application...DONE
Uploading bundle for application: 9457256...DONE
Deploying bundle: 7457571 for application: 9457256 ...
Waiting for task: 1318281115
building: Parsing manifest
building: Building image: 8835510
building: Installing system dependencies
building: Fetching packages
building: Building package: rstan
Error in curl::curl_fetch_memory(url, handle = handle) :
Timeout was reached: [api.shinyapps.io] Failed to connect to api.shinyapps.io port 443 after 9554 ms: Timed out
Timing stopped at: 0 0 9.59
Ahh right, you now indeed are hit with the next problem. shinyapps.io is trying to build rstan
from source. To put it mildly, this is a fairly resource intensive process (Compiling C++ code always eats lots of resources).
Posit however provided pre-compiled binary versions of R packages. In order to use those you could set - prior to deploying again - the default CRAN repository to
options(repos=c(CRAN="https://packagemanager.posit.co/cran/__linux__/focal/latest"))
library(rsconnect)
deployApp()
Kindly let me know if this fixes your deployment issue.