【发布时间】:2020-03-07 13:13:04
【问题描述】:
我可以在本地部署我的 Shiny 应用程序,但是当我尝试在 shinyapps.io 中部署它时,应用程序无法启动
我已经检查了很多问题和类似问题,但没有一个答案对我有用。我的代码中没有包含 install.packages() 或 setwd() 行。
我的闪亮应用使用以下库:
library(shiny)
library(RColorBrewer)
library(data.table)
library(sf)
library(ggmap)
library(osmdata)
library(rsconnect)
library(tidyverse)
当我尝试部署它时,我在闪亮的应用程序 url 中收到此错误消息:
An error has occurred
The application failed to start (exited with code 1).
Error in value[[3L]](cond) : there is no package called ‘RColorBrewer’
Calls: local ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted
而 RStudio IDE 中的这个错误:
Preparing to deploy application...DONE
Uploading bundle for application: 1454528...DONE
Deploying bundle: 2581070 for application: 1454528 ...
Waiting for task: 666404305
building: Processing bundle: 2581070
building: Installing packages
building: Installing files
building: Pushing image: 2799820
deploying: Starting instances
terminating: Stopping old instances
Application successfully deployed to https://racofernandez.shinyapps.io/superficie-deptos-caba/
Deployment completed: https://racofernandez.shinyapps.io/superficie-deptos-caba/
Warning message:
In fileDependencies.R(file) :
Failed to parse C:/Users/rama_/AppData/Local/Temp/Rtmp63cnOU/file3b2c779a2a37/app.R ; dependencies in this file will not be discovered.
有什么建议吗?谢谢!
【问题讨论】:
-
there is no package called ‘RColorBrewer’:看起来很简单,不是吗?你需要安装它 -
嗨!我已经在本地安装了所有的包,我可以在本地运行应用程序,我认为在服务器中部署应用程序时,shinyapps.io 如何检测应用程序用于安装它们的包是一个问题。