Error while opening the shiny app webpage

Hi, I'm trying to deploy my first shiny app and it's a pretty simple one. I sucessfully deploy it on Rstudio, but when the link opens it returns an error:

The code for my app is the following:

#setwd("C:/Users/Utilizador/Desktop/script/directory/app1")
#install.packages("shiny")
#if (!require("devtools"))
  #install.packages("devtools")
#devtools::install_github("shiny", "rstudio")
#install.packages('rsconnect')

#library(rsconnect)
#library(shiny)
#rsconnect::setAccountInfo(name='jtadeusfontes', token='50F7221CC3111A15FDBC6A492A5195C5', secret='UtiaRJK4JMOBKeW8na3/i3CxT5CTyVNlYK/QcbSt')
#rsconnect::deployApp("C:/Users/Utilizador/Desktop/script/directory/app1")
library(shiny)
ui <- fluidPage(
  textInput(inputId="taxa", 
            label="Enter the name of the taxon:",placeholder="Example: Cetacea"),
  numericInput(inputId="num",label="Enter a number",value=25),
  plotOutput("bar1")
)

server <- function(input, output){
  library(rsconnect)
  output$bar1<-renderPlot({
    title="Random numbers normal distribution"
    hist(rnorm(input$num),main=title)
  })
}

shinyApp(ui=ui,server=server)



#?shinyThemes
#?sliderInput
#?actionButton()
#?sumbitButton()

Thanks so much in advance for any responses

The error at runtime means your code is somewhere trying to install some package and you can't to that.

Try to check if the line you commented here are really commented in the files published. Or if you have any others in one the file you published.

I would advice to have a separate deploy script with installation process and deploy commands, file that you won't select for deployment.

1 Like

ok thank you very much, I'll try those suggestions

Hi again, now I'm getting an even more troubling error because now I can't even pusblish the app, I'm gettin the following:

ok sorry, I erased the old app from the folder it was in and put it in another one and it worked. I made sure I put all installs on comments and now it deploys, thank you so much

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.