Shinyapps.io and github Packages

I have a brilliant program in R that works great. But I had problems deploying it to shinyapps.io.

The javascript error console gives me the following error:

Listening on http://127.0.0.1:46574 Downloading github repo jlisic/ saAlloc@master Installing saAlloc '/usr/lib/R/bin/R' --vanilla CMD INSTALL \ '/tmp/RtmpvmoFM3/devtools2c6b564aad/jlisic-saAlloc-62692fc' \ --library='/usr/local/lib/R/site-library' --install-tests Error: ERROR: no permission to install to directory '/usr/local/lib/R/site-library' Error : Command failed (1) 

There is nothing unusual in my package, it just has a default Makevars file. Any help or suggestions would be appreciated.

+7
github r shiny
source share
1 answer

I also struggled with this problem, and I just found a working answer in the shinyapps.io Google user group at @Yihui. Quoting his message:

You should not install the package inside your application (i.e. do not call install_github() in your application code). Just install it locally and shinyapps.io will figure out how to install it on the server.

https://groups.google.com/d/msg/shinyapps-users/5S8jTJ-SeHM/HCPGUjYVUM4J

Removing the devtools::install_github() in server.R worked for me. The magic of the back end!

EDIT: The reason for this is explained in more detail in this rsconnect issue: https://github.com/rstudio/rsconnect/issues/88

+4
source share

All Articles