Using npm to install d3 and and then using
var d3 = require("d3"),
jsdom = require("jsdom");
var document = jsdom.jsdom(),
svg = d3.select(document.body).append("svg");
as mentioned on the d3 documentation does not work because require cannot be used with d3.Using import statement breaks other libraries that I want to use.