Thursday, September 18, 2014

d3 uses createWindow but latest jsdom removed it?

I was trying to use d3 with node.js. It seems that d3.js uses createWindow but latest jsdom removed it, so it gave error like:
 "Object [ null ] has no method 'createWindow' d3"
In jsdom's changelog it was mentioned that jsdom.createWindow was among removed jsdom APIs in version 1.0.0-pre.1. BTW, latest version of jsdom as of this writing is 1.0.0-pre.6, so a default installation of jsdom via "npm install jsdom" will not contain support for createWindow.
Hence, it seems that to run d3.js, older jsdom must be used, i.e., version 0.11.1 which is the latest version before 1.0.0-pre.1:
sudo npm remove jsdom 
sudo npm install jsdom@0.11.1

No comments:

Post a Comment