I have write a r package and a shinyapp, it runs on my Rstudio when I click the "Run App", and I register a shinyapp.io account and use Rstudio to connect to it. But when I try to deploy the shinyapp into io. The web page shows error that
" An error has occurred
The application failed to start (exited with code 1).
`Error in value[[3L]](cond) : there is no package called ‘my_github_package’
Calls: local ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted`
I've run into instances of this as well. When deploying, make sure to have your GitHub package installed from GitHub (devtools::install_github()), not installed from a local folder (devtools::install()).
When installed from GitHub, devtools will store the GitHub location and hash for shinyapps to download. (If installed from a local folder, there is no location to download from.)
I tried that, also don't work, then I notice that when click the publish button, there are options what files to deploy,
only deploy the shiny.R instead of whole package, then it works! So I guess install from github and only deploy the shiny.R, both two steps need to be done.Thanks!