Reputation: 18248
Tweet: Mike Bostock recently tweeted:
If you like making maps in Illustrator, TopoJSON 1.6.9 supports conversion to SVG. No code required! https://github.com/mbostock/topojson/blob/master/bin/topojson-svg
——Mike Bostock (@mbostock) 30 Avril 2014
Cool !
Topojson version: on my terminal, I checked the version...
$topojson --version
>1.6.11
$node --version
>v0.10.25
Seems good.
Topojson-svg trial: so I gave it a shoot...
curl -o uk.topo.json 'http://bost.ocks.org/mike/map/uk.json' #get an online topoJSON file
topojson-svg -o output.svg uk.topo.json #this fails
Error: I get a corrupt .svg file together with this ugly error message
fs.js:393
binding.close(fd, makeCallback(callback));
^
TypeError: Bad argument
at Object.fs.close (fs.js:393:11)
at Object.<anonymous> (/home/yug/local/lib/node_modules/topojson/bin/topojson-svg:85:32)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:902:3
Question: How to process to successfully use topojson-svg
?
Edit: also occured with recently installed local (non-global) /node_module
:
npm install topojson #locally install topojson.js & topojson-svg
curl -o uk.topo.json 'http://bost.ocks.org/mike/map/uk.json' #get an online topoJSON file
node_modules/.bin/topojson-svg -o output.svg uk.topo.json #this fails
Upvotes: 0
Views: 1333
Reputation: 18248
Fixed on github within 4minutes after reporting the issue.
Will be available within hours/days on npm
, with topojson v.1.6.12+
Upvotes: 2