[英]shinyapps.io and github Packages
I have a shiny program in R that works great. 我在R中有一个很棒的程序,效果很好。 But I am having trouble deploying it to shinyapps.io.
但是我在将其部署到shinyapps.io时遇到了麻烦。
The javascript error console gives me the following error: javascript错误控制台给我以下错误:
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 fancy about my package it just has a default Makevars file. 我的软件包没有什么花哨的东西,它只有一个默认的Makevars文件。 Any help or suggestions would be appreciated.
任何帮助或建议,将不胜感激。
I have also been struggling with this issue, and I just found a working answer in the shinyapps.io Google users group by @Yihui. 我也在这个问题上苦苦挣扎,我刚刚在@Yihui的shinyapps.io Google用户组中找到了一个可行的答案。 Quoting his post:
引用他的帖子:
You should not install the package inside your app (ie do not call
install_github()
in your app code).您不应该将软件包安装在应用程序内部(即,不要在应用程序代码中调用
install_github()
)。 Just install it locally, and shinyapps.io will figure out how to install it on the server.只需在本地安装它,shinyapps.io就会弄清楚如何在服务器上安装它。
https://groups.google.com/d/msg/shinyapps-users/5S8jTJ-SeHM/HCPGUjYVUM4J https://groups.google.com/d/msg/shinyapps-users/5S8jTJ-SeHM/HCPGUjYVUM4J
Removing the devtools::install_github()
line in server.R
worked for me. 删除
server.R
的devtools::install_github()
行对我server.R
。 Back end magic! 后端魔术!
EDIT: The reason why this works is explained in more detail in this rsconnect
issue: https://github.com/rstudio/rsconnect/issues/88 编辑:此工作的原因在以下
rsconnect
问题中进行了详细说明: https : //github.com/rstudio/rsconnect/issues/88
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.