【问题标题】:The application failed to start (exited with code 1) in R Shiny应用程序无法在 R Shiny 中启动(以代码 1 退出)
【发布时间】:2018-06-23 09:47:58
【问题描述】:

我在部署闪亮的应用程序时收到错误“应用程序无法启动(以代码 1 退出)”。

错误消息已附加。在控制台中我在部署后收到以下消息:

Preparing to deploy application...DONE
Uploading bundle for application: 365672...DONE
Deploying bundle: 1444503 for application: 365672 ...
Waiting for task: 533366947
building: Parsing manifest
building: Building image: 1457861
building: Fetching packages
building: Installing packages
building: Installing files
building: Pushing image: 1457861
deploying: Starting instances
rollforward: Activating new instances
success: Stopping old instances
Application successfully deployed to 
https://programmingrpython.shinyapps.io/shinyapp/

应用程序在本地运行。但是,当我运行应用程序时,我会在控制台中收到这些消息:

The following object is masked from ‘package:ggplot2’:

last_plot

The following object is masked from ‘package:stats’:

filter

The following object is masked from ‘package:graphics’:

layout

Warning in origRenderFunc() :
Ignoring explicitly provided widget ID "52982fb160e2"; Shiny doesn't use them
Warning in origRenderFunc() :
Ignoring explicitly provided widget ID "5298324e516f"; Shiny doesn't use them

我使用的包是:

library(shiny)
library(plotly)
library(data.table)

是因为警告信息吗? 我已关注https://github.com/ropensci/plotly/issues/985,但我仍然收到此警告。

能否请教一下为什么部署后会显示错误消息?

【问题讨论】:

    标签: r shiny


    【解决方案1】:

    您的应用开头是否有setwd() 函数?在部署您的应用程序之前,您需要评论或删除它。我总是#comment。

    注释代码中指定计算机目录上的本地路径的任何部分

    【讨论】:

    • 这应该是评论(要求@amjear 澄清),而不是答案。另外,我也遇到了同样的问题,但这不是因为 setwd() 函数的存在。
    • 这个问题有答案吗?
    【解决方案2】:

    我有同样的问题。我在创建应用程序时评论了library(Shiny) 行,它已成功部署。

    【讨论】:

      猜你喜欢
      • 2020-03-07
      • 2021-03-11
      • 2015-04-08
      • 1970-01-01
      • 2019-03-03
      • 2022-01-11
      • 2022-01-23
      • 2021-12-02
      • 1970-01-01
      相关资源
      最近更新 更多