"chorddiag" won't draw together with a "collapsibleTree" in a shiny app

shiny

#1

I have an issue while using the chorddiag and the collapsibleTree packages in the same shiny app.
Here is a minimal example. The chord Diagram will not draw, except if I comment out the line collapsibleTreeOutput("tree"). Note that the two graphs use D3.js

Thank you for your help...

library(shiny)
library(chorddiag)
library(collapsibleTree)

ui <-   fluidPage(
  h5("a chordDiagram should be here"),
  chorddiag::chorddiagOutput("chordDiagram"),
  h5("a collapsibleTree should be here"),
# The chord diagram will appear if I comment out the following line
  collapsibleTree::collapsibleTreeOutput("tree"),
  hr()  
)
server <- function(input, output) {
  output$chordDiagram <- renderChorddiag({  
    m <- matrix(1:9, nrow = 3, ncol = 3)
    row.names(m) <- colnames(m) <- c("a", "b","c")
    chorddiag::chorddiag(m)    
  })  
  output$tree <- renderCollapsibleTree(
    collapsibleTree::collapsibleTree(warpbreaks, c("wool", "tension"))
  )  
}
shinyApp(ui, server)

I am using
‘collapsibleTree’ version 0.1.7
‘shiny’ version 1.1.0
‘chorddiag’ version 0.1.2 (devtools::install_github("mattflor/chorddiag"))
R version 3.5.0

My Firefox console reads:

TypeError: d3.layout is undefined[Learn More] chorddiag.js:12:5

TypeError: chord is undefined[Learn More] chorddiag.js:22:5