It seems that the Plotly.d3 object was removed from version >2 (at least according to this announcement).
Plotly.d3