1

I am getting an error when using topojson saying that the command cannot be found. I think the install has gone OK but there just isn't a command for topojson, but there are ones for topo2geo, topomerge etc. I'm using nvm if that is relevant and on mac.

Some Node details:

    Grahams-MacBook-Air:data grahamfletcher$ ls -l /Users/grahamfletcher/.nvm/versions/node/v7.10.0/lib/node_modules/
total 0
    drwxr-xr-x   3 grahamfletcher  staff  102 14 Jul 22:01 @angular
    drwxr-xr-x   7 grahamfletcher  staff  238 10 Oct 02:58 create-react-app
    drwxr-xr-x  11 grahamfletcher  staff  374 14 Jul 23:35 eslint
    drwxr-xr-x  18 grahamfletcher  staff  612 25 Jul 01:34 nodemon
    drwxr-xr-x  25 grahamfletcher  staff  850  3 May  2017 npm
    drwxr-xr-x  13 grahamfletcher  staff  442 22 Nov 13:00 ogr2ogr
    drwxr-xr-x  11 grahamfletcher  staff  374 22 Nov 14:42 topojson

topojson is there, but...

    Grahams-MacBook-Air:data grahamfletcher$ ls -l     /Users/grahamfletcher/.nvm/versions/node/v7.10.0/bin
total 69760
    lrwxr-xr-x  1 grahamfletcher  staff        45 10 Oct 02:58 create-react-app -> ../lib/node_modules/create-react-app/index.js
    lrwxr-xr-x  1 grahamfletcher  staff        40 14 Jul 23:35 eslint -> ../lib/node_modules/eslint/bin/eslint.js
    lrwxr-xr-x  1 grahamfletcher  staff        70 15 Nov 11:10 geo2topo -> ../lib/node_modules/topojson/node_modules/topojson-server/bin/geo2topo
    lrwxr-xr-x  1 grahamfletcher  staff        39 14 Jul 22:01 ng -> ../lib/node_modules/@angular/cli/bin/ng
    -rwxr-xr-x  1 grahamfletcher  staff  35672760  3 May  2017 node
    lrwxr-xr-x  1 grahamfletcher  staff        42 25 Jul 01:34 nodemon -> ../lib/node_modules/nodemon/bin/nodemon.js
    lrwxr-xr-x  1 grahamfletcher  staff        38  3 May  2017 npm -> ../lib/node_modules/npm/bin/npm-cli.js
    lrwxr-xr-x  1 grahamfletcher  staff        70 15 Nov 11:10 topo2geo -> ../lib/node_modules/topojson/node_modules/topojson-client/bin/topo2geo
    lrwxr-xr-x  1 grahamfletcher  staff        71 15 Nov 11:10 topomerge -> ../lib/node_modules/topojson/node_modules/topojson-client/bin/topomerge
    lrwxr-xr-x  1 grahamfletcher  staff        74 15 Nov 11:10 topoquantize -> ../lib/node_modules/topojson/node_modules/topojson-client/bin/topoquantize
    lrwxr-xr-x  1 grahamfletcher  staff        76 15 Nov 11:10 toposimplify -> ../lib/node_modules/topojson/node_modules/topojson-simplify/bin/toposimplify

No topojson here??

My path, which is saying something about a valid identifier. Is this an issue?

    Grahams-MacBook-Air:data grahamfletcher$ export $PATH
-bash: export: `/Library/Frameworks/GDAL.framework/Programs:/opt/local/bin:/opt/local/sbin:/Users/grahamfletcher/.nvm/versions/node/v7.10.0/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/local/bin:/usr/local/share/dotnet:/Library/Frameworks/Mono.framework/Versions/Current/Commands': not a valid identifier
altocumulus
  • 21,179
  • 13
  • 61
  • 84
  • It looks like topojson has installed correctly. Have you tried running your node project? – Thomas5631 Nov 23 '17 at 20:34
  • I've installed globally so I can use topojson from the command line. When I enter the command topojson in the terminal it says the command cannot be found. Topomerge etc work and ogr2ogr work. Just can't see why topojson doesn't! – Graham Fletcher Nov 24 '17 at 10:27
  • I thin from the link https://medium.com/@aendrew/creating-topojson-using-d3-v4-10838d1a9538 it is mentioned that "Note also that topojson/topojson is no longer the command-line tools for manipulating TopoJSON — that’s all been put in the topojson/topojson-client repository."You would need to read the reference page "https://github.com/topojson/topojson-client/blob/master/README.md". to find usable command. – smile Dec 13 '17 at 04:39

0 Answers0