I want to use topojson on the command line to simplify some files. npm will install topojson without any errors:

npm install -g topojson

But then running:


produces -bash: topojson: command not found. This article suggests that:

topojson/topojson is no longer the command-line tools for manipulating TopoJSON — that’s all been put in the topojson/topojson-client repository.

So I am trying:

npm install -g topojson-client

But then trying topojson-client produces command not found, and so does topojson and I can't see any documentation in either repo explaining what to do. Can anyone suggest any ideas?

1 Answer 1


Unless you are running stuff as a superuser you won't get executables put into standard system path locations. I seem to have a topojson installed and the executables are in the .npm folder for the package:

s ~/.npm/topojson/1.6.19/package/bin/
bower  package  topojson  topojson-geojson  topojson-group  topojson-merge  topojson-svg

These don't actually work for me probably because some other dependency is missing...

$ ~/.npm/topojson/1.6.19/package/bin/topojson-geojson 
    throw err;

Error: Cannot find module 'rw'

but your installer should have put them somewhere...


assuming they still exist. My topojson as above is positively ancient. The command you want might be geo2topo now: https://github.com/topojson/topojson-server/blob/master/bin/geo2topo

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.