闪亮的应用程序无法读取包:应用程序无法启动(退出代码 1)
Shiny app fails at reading packages: The application failed to start (exited with code 1)
我可以在本地部署我的 Shiny 应用程序,但是当我尝试在 shinyapps.io 中部署它时,应用程序无法启动
我已经检查了很多问题和类似问题,但 none 的答案对我有用。我的代码中没有包含 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.
有什么建议吗?谢谢!
欢迎来到 SO!
您的错误日志打印:
Failed to parse C:/Users/rama_/AppData/Local/Temp/Rtmp63cnOU/file3b2c779a2a37/app.R ; dependencies in this file will not be discovered.
shinyapps.io通过解析R文件检测依赖,检测需要的包。
在这里,shinyapps 无法解析 app.R
文件,因此无法检测到需要哪些包。
您可能想在本地尝试 packrat::init()
以检测错误。
问题是由我的脚本中包含的特殊字符(如“ñ”)引起的,如以下问题所示:
我可以在本地部署我的 Shiny 应用程序,但是当我尝试在 shinyapps.io 中部署它时,应用程序无法启动
我已经检查了很多问题和类似问题,但 none 的答案对我有用。我的代码中没有包含 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.
有什么建议吗?谢谢!
欢迎来到 SO!
您的错误日志打印:
Failed to parse C:/Users/rama_/AppData/Local/Temp/Rtmp63cnOU/file3b2c779a2a37/app.R ; dependencies in this file will not be discovered.
shinyapps.io通过解析R文件检测依赖,检测需要的包。
在这里,shinyapps 无法解析 app.R
文件,因此无法检测到需要哪些包。
您可能想在本地尝试 packrat::init()
以检测错误。
问题是由我的脚本中包含的特殊字符(如“ñ”)引起的,如以下问题所示: