Deploy app on shinyapps.io, error concerning plotly: could not find function "plotlyOutput"

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.

The call to plotlyOutput you cite in your UI does not match the call to plotlyOutput in the error message (different argument). Are you sure they are coming from the same app?

Yes, the app contains two sunbursts, including the one giving an error:

output$instruments_sunburst <- renderPlotly({
sunburst_finance_count <-
plot_ly(
data = sunburstDF_inst,
ids = ~ids,
labels = ~labels,
parents = ~parents,
values = ~values,
type = 'sunburst',
branchvalues = 'total',
hoverinfo = 'text',
textinfo = 'label+percent parent', # Add the count to the textinfo by adding +value
hovertext = ~hoverinfo,
insidetextorientation = "radial", # Adjust text orientation
marker = list(
colors = custom_colors_instruments # Apply the custom color scale
)
)

sunburst_finance_count

})

             tabPanel("Panel name", 
                      h4("TextText"), 
                      p("TextText."), 
                      plotly::plotlyOutput(outputID="instruments_sunburst"
                                   # , height = "800px"
                                   )),

Does the error message literally contain "name_of_sunburst_plot"? I'm not seeing that in your code excerpts.