我正在尝试从 RStudio 部署一个闪亮的应用程序。除了“ui.r”和“server.r”文件,我还有 3 个 .RDS 文件(50kb、15mb 和 18mb),我在 server.r 文件中读取它们,它们在本地工作正常。当我开始上传时,它无法给出以下错误:
Preparing to deploy application...DONE
Uploading bundle for application: 794264...
Error in force(code) : Could not upload file.
Calls: <Anonymous> -> withStatus -> force
Execution halted
我尝试选择 50kb 和 15mb 的文件,这很有效。当我单独选择 18 mb 时,它可以工作,但是当我选择所有三个时,它似乎不起作用。我将文件大小增加到大约。500 mb(这很可能会缩小捆绑包的大小),使用以下内容:
options(rsconnect.max.bundle.files = 500000000)
当我阅读它时,它以字节为单位。
那是徒劳的。
我使用控制台部署:
deployApp(appDir="Documents/GitHub/DataScience_JH_Coursera_Assignments/10.Capstone/shinyapp/PredictionText/",logLevel="verbose",lint=TRUE)
无济于事,但我设法将有问题的行归零,并得到以下日志:
----- Deployment error -----
Error in force(code) : Could not upload file.
----- Error stack trace -----
4: stop("Could not upload file.")
3: force(code)
2: withStatus(paste0("Uploading bundle for ", assetTypeName, ": ",
application$id), {
bundlePath <- bundleApp(target$appName, appDir, appFiles,
appPrimaryDoc, assetTypeName, contentCategory, verbose)
if (isShinyapps(accountDetails)) {
bundleSize <- file.info(bundlePath)$size
checkSum <- md5sum(bundlePath)
bundle <- client$createBundle(application$id, "application/x-tar",
bundleSize, checkSum)
if (verbose)
timestampedLog("Starting upload now")
if (!uploadBundle(bundle, bundleSize, bundlePath)) {
stop("Could not upload file.")
}
if (verbose)
timestampedLog("Upload complete")
response <- client$updateBundleStatus(bundle$id, status = "ready")
bundle <- client$getBundle(bundle$id)
}
else {
bundle <- client$uploadApplication(application$id, bundlePath)
}
})
1: deployApp(appDir = "Documents/GitHub/DataScience_JH_Coursera_Assignments/10.Capstone/shinyapp/PredictionText/",
logLevel = "verbose", lint = TRUE)
所以这里失败了,我假设:
if (!uploadBundle(bundle, bundleSize, bundlePath)) {
仅供参考,如果我在得到以下信息时正确进行了转换,我的捆绑包大小设置为大约 3gb:
getOption("rsconnect.max.bundle.size")
[1] 3145728000
我已经坚持了5天了。我阅读了所有我能阅读的论坛,尝试单独上传文件,却发现 shiny/rsconnect 似乎在此之前删除了实例,因此无法逐个上传文件。我什至尝试弄乱 .dcf rsconnect 文件,但也没有。任何帮助/见解将不胜感激。