How to use local packages in shinyapps.io

I am trying to use a local package which isn't available on CRAN.I did try using devtools::install_github("youruser/yourpackage") but I keep on getting Error:

Unhandled Exception: Child Task 586815173 failed: Error building image: Error fetching MY_LOCAL_PACKAGE source. <CRANPackageSource repo='http://cran.rstudio.org'> unable to satisfy package:MY_LOCAL_PACKAGE In addition: Warning message: In FUN(X[[i]], ...) : Package 'MY_LOCAL_PACKAGE ' was installed from sources; Packrat will assume this package is available from a CRAN-like repository during future restores Execution halted this error message

What is the output of rsconnect::appDependencies()?

Is the GitHub repository private or public?

Its in a private repo which isnt connected to shinyapps.io via github connection.

Warning message:
In FUN(X[[i]], ...) :
  Package 'MY_LOCAL_PACKAGE' was installed from sources; Packrat will assume this package is available from a CRAN-like repository during future restores

As you can see, shinyapps.io can't work with locally installed packages from source.

Per the documentation:

Currently, the shinyapps.io service supports deploying packages installed from CRAN, GitHub (both public and private repos), and BioConductor.

You will need to connect your shinyapps.io account to GitHub in order to use the package.

1 Like

So once I connect the Github account with shinyapps.io it should install those packages even if its a private repo right.

As long as your GitHub user has access to them, correct.

1 Like

Thank you @josh . I will connect those two accounts and test that.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.