问题
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
来源:https://stackoverflow.com/questions/47462775/topojson-command-not-added-on-npm-install