【问题标题】:Shinyapps.io publish issue: webshot dependent library "PhantomJS" missingShinyapps.io 发布问题:缺少 webshot 依赖库“PhantomJS”
【发布时间】:2019-04-03 22:06:56
【问题描述】:

当我将我的应用发布到 shinyapps.io 时,我遇到了以下问题:

  • PhantomJS
  • file(con, "rb"): 无法打开连接

输出pdf文件中的完整日志:

PhantomJS not found. You can install it with webshot::install phantomjs(). If it is installed, please make sure the phantomjs executable can be found via the PATH variable.
Warning in normalizePath(f2): path[1]="./webshot6c3d201217.pdf": No such file or directory 
Warning in file(con, "rb"): cannot open file ’./webshot6c3d201217.pdf’: No such file or directory
 Error in file(con, "rb"): cannot open the connection
A tibble: 0 x 2
... with 2 variables: group <chr>, sort.order <dbl>
PhantomJS not found. You can install it with webshot::install phantomjs(). If it is installed, please make sure the phantomjs executable can be found via the PATH variable.
Warning in normalizePath(f2): path[1]="./webshot6c23dc44d3.pdf": No such file or directory
Warning in file(con, "rb"): cannot open file ’./webshot6c23dc44d3.pdf’: No such file or directory
Error in file(con, "rb"): cannot open the connection

在本地 Shiny 服务器上安装 PhantomJS 后,我可以成功创建 PDF,但是,我不知道如何在 shinyapps.io 上解决它。

【问题讨论】:

    标签: r shiny shinyapps


    【解决方案1】:

    来自 RStudio:

    “对于 shinyapps.io 上的软件包缺少的任何系统依赖项,我们要求您在我们的存储库中提出问题:https://github.com/rstudio/shinyapps-package-dependencies 明确说明所需的依赖项以及您尝试安装的特定软件包。如果这是紧急,我们建议按照我们的步骤提交拉取请求:https://github.com/rstudio/shinyapps-package-dependencies/blob/master/CONTRIBUTING.md"

    我的跟进:

    https://github.com/rstudio/shinyapps-package-dependencies/pull/180

    【讨论】:

    • 来自 RStudio:您应该能够使用 webshot::install_phantomjs() 将 PhantomJS 直接从您的 Shiny 应用程序安装到用户可写的位置,并使用 webshot:::find_phantom() 来检查它是否已经存在并跳过安装。
    猜你喜欢
    • 2016-10-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-04-12
    • 1970-01-01
    • 2014-01-05
    • 2013-10-11
    相关资源
    最近更新 更多