Hi, I am trying to deploy an app that includes a plotly figure on shinyapps.io. When running the app locally, it works fine. However, when deploying the app on shinyapps.io, I get this erros:
2025-11-13T16:47:42.859249+00:00 shinyapps[...]: Error in plotlyOutput("name_of_sunburst_plot")
2025-11-13T16:47:42.863966+00:00 shinyapps[...]: could not find function "plotlyOutput"
The plotly package is installed directly in the R console, including dependencies.
Packages are loaded at the beginning of global.R (and also app.R, which also didn't help).
library(ggplot2) # dependency
library(stats) # dependency
library(graphics) # dependency
library(plotly)
In ui, I use:
ui <- navbarPage("Name of project", id = "main",
tabPanel("TitleOfPanelTab",
h4("Title of plot"),
p("Description of plot"),
plotlyOutput(outputID="ecosystems_sunburst"
# , height = "800px"
)),
In server, I use
output$ecosystems_sunburst <- renderPlotly({
# assumes sunburstDF and custom_colors are defined in global.R or earlier in server.R sunburst_ecos_perc <- plot_ly( data = sunburstDF, ids = ~ids, labels = ~labels, parents = ~parents, values = ~values, type = 'sunburst', branchvalues = 'total', hoverinfo = 'text', textinfo = 'label+percent parent', hovertext = ~hoverinfo, insidetextorientation = "radial", marker = list(colors = custom_colors_ecos) ) sunburst_ecos_perc})
I appreciate any advise how to address this error.