Error: account named '[object Object]' does not exist in Shiny (R)

Error: account named '[object Object]' does not exist in Shiny (R)

从 Rstudio (windows) 发布我的闪亮代码时,我进入了帐户名字段“[object Object]”而不是我的帐户名,导致出现以下错误消息:

Error: account named '[object Object]' does not exist

我尝试了几件事,但似乎没有任何效果。请注意,我有最新版本的 shinyapps 并尝试了生成新令牌等操作

谢谢,

这是我使用的代码:

ui.R

library(shiny)
library(shinyapps)

ui<- fluidPage(

titlePanel("Bidding Centre"),
  
#Sidebar with a slider input for number of bins
sidebarLayout(
  sidebarPanel(
    
    sliderInput(inputId = "bins",
                label = "Number of bins:",
                min = 1,
                max = 50,
                value = 30),
    
    textInput(inputId = 'title',
              label = 'Write a title',
              value = 'Try me!')),
  
# Show a plot of the generated distribution
  mainPanel(
    plotOutput("distPlot")
  )
)
  
)

server.R

library(shiny)

shinyServer(function(input, output) {

  output$distPlot <- renderPlot({

    # generate bins based on input$bins from ui.R
    x    <- faithful[, 2]
    bins <- seq(min(x), max(x), length.out = input$bins + 1)

    # draw the histogram with the specified number of bins
    hist(x, breaks = bins, col = 'darkgray', border = 'white',main=input$title) })
})

我遇到了同样的问题。我会单击 运行 App,然后单击 'Publish',但收到相同的错误消息:

Error: account named '[object Object]' does not exist

我能够通过 运行 命令手动修复它:

shinyapps::deployApp('~/path/to/app')

希望对您有所帮助!