I have written a Shiny App that will render two plotlyOutputs when it is started. I'm hosting this app as a shinylive app on a Microsoft Internet Information Services webserver. When visiting the website, only the second plot is actually rendered correctly, the first plot fails with the following error message in the browser console:
Uncaught (in promise) ReferenceError: Plotly is not defined
at Object.renderValue (plotly.js:162:18)
at htmlwidgets.js:539:22
As soon as I modify the first plot, i.e. using some control widgets to filter the underlying data causing the plot to re-render, everything works fine.
Furthermore, everything works fine when I run the shiny app locally using RStudio, which leads me to believe that the issue might be caused by shinylive.
I have written a Shiny App that will render two plotlyOutputs when it is started. I'm hosting this app as a shinylive app on a Microsoft Internet Information Services webserver. When visiting the website, only the second plot is actually rendered correctly, the first plot fails with the following error message in the browser console:
Uncaught (in promise) ReferenceError: Plotly is not defined at Object.renderValue (plotly.js:162:18) at htmlwidgets.js:539:22
As soon as I modify the first plot, i.e. using some control widgets to filter the underlying data causing the plot to re-render, everything works fine.
Furthermore, everything works fine when I run the shiny app locally using RStudio, which leads me to believe that the issue might be caused by shinylive.
Edit: Here is a simple demo app showing the problem: https://valentin-kamm.github.io/shinylivePlotlyIssueDemo/