1

我想将一个闪亮的应用程序部署到shinyapps.io ,但几个月来我一直未能全部发布:-(

有人可以逐步向我解释下面概述的特定设置我需要做什么吗?

设置

  • 该应用程序依赖于位于私有 GitHub 存储库中的自定义包
  • 我没有 RStudio Connect 可访问的完整 R 包存储库以安装自定义包,但想从 GitHub 安装它
  • 一个.Rprofile文件位于我要发布的项目的根目录中,它包含
local({
  r <- getOption("repos")
  r["CRAN"] <- "https://cran.rstudio.com/"
  r["mycompany"] <- "https://github.com/rappster/mypkg/"
  options(repos = r)
})
  • 自定义包的tar.gz构建位于/opt/r-packages/<pkg-name>/<git-commit-hashkey>.tar.gz
  • 一个gcfg文件存在,/etc/rstudio-connect/rstudio-connect.gcfg它只包含SourcePackageDir = "opt/r-packages"
  • 自定义包本身有许多依赖项,这些依赖项都在 CRAN 上可用
  • 闪亮应用程序的代码位于项目根目录中的几个文件中,这些文件当前对应于自定义的包项目(因为我认为这将是最容易进行发布工作的),但我也可以将它放在它自己的 RStudio 中/R 项目,如果有帮助的话

尽职调查

我读了

但无法让事情正常进行。

我得到的 RStudio Connect 部署错误

<...>
[2019-02-05T11:50:16.877574592+0000] Building R package: mypkg (0.0.2.9002)
/mnt/packages/build /mnt
Warning in untar2(tarfile, files, list, exdir, restore_times) :
  skipping pax global extended headers
* installing to library ‘/opt/R/3.5.1/lib/R/library’
* installing *source* package ‘mypkg’ ...
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  there is no package called ‘philentropy’
ERROR: lazy loading failed for package ‘climater’
* removing ‘/opt/R/3.5.1/lib/R/library/mypkg’GET /v1/tasks/?filter=account_id:113102&filter=parent_id:584709513&count=100&offset=0 590ms
################################# End Task Log ################################# 
----- Deployment error -----
Error: Unhandled Exception: Child Task 584709513 failed: Error building image: Error building mypkg (0.0.2.9002). Build exited with non-zero status: 1

----- Error stack trace -----
3: stop(status$error, call. = FALSE)
2: client$waitForTask(taskId, quiet)
1: rsconnect::deployApp(appDir = "C:/Users/janko/Dropbox (Personal)/Code/R/Packages/_Dev/mypkg", 
       appFileManifest = "C:/Users/janko/AppData/Local/Temp/6d2a-63b4-2877-4884", 
       account = "janko-thyson", server = "shinyapps.io", appName = "mypkg", 
       appId = 585041, launch.browser = function(url) {
           message("Deployment completed: ", url)
       }, lint = FALSE, metadata = list(asMultiple = FALSE, asStatic = FALSE, 
           ignoredFiles = <...>), 
       logLevel = "verbose")
Error: Unhandled Exception: Child Task 584709513 failed: Error building image: Error building mypkg (0.0.2.9002). Build exited with non-zero status: 1
Execution halted

这是否意味着我需要构建所有包的依赖项并将其放在 下opt/<pkg-dependency-name>/<git-commit-hashkey>.tar.gz

抱歉,万一这是重复的,或者似乎有点非结构化/冗长,但我的脑袋完全在旋转,试图让它工作,我不知道从哪里开始进行故障排除......

4

0 回答 0