npm install运行正确,但无法运行topojson
如果我这样做:npm install运行正确,但无法运行topojson,npm,Npm,如果我这样做: npm init npm install --save topojson 最后,我得到了一个package.json文件和node\u modules目录,看起来都是正确的。但如果我这样做: topojson 我明白了: -bash: topojson: command not found 为什么?试试这一步 使用-g 1. install nodejs http://nodejs.org/ 2. install npm https://npmjs.org/doc/RE
npm init
npm install --save topojson
最后,我得到了一个package.json文件和node\u modules
目录,看起来都是正确的。但如果我这样做:
topojson
我明白了:
-bash: topojson: command not found
为什么?试试这一步
使用-g
1. install nodejs http://nodejs.org/
2. install npm https://npmjs.org/doc/README.html
3. run npm install -g topojson in your command prompt
4. use the command prompt to cd to the geojson file
5. run topojson -o myNewTopojsonFile.json myOldGeojsonFile.json
这个问题的答案与npm无关-
npm install topojson
不再安装名为topojson
的命令行工具。令人困惑的是,包已更改。解决方案的可能副本不起作用-如果我执行$ls./node\u modules/.bin/
我会看到各种模块,但不会看到topojson
。因此,我假设不是重复的。似乎topojson
包没有注册topojson
二进制文件。它确实产生了geo2topo
,toposimplify
,topo2geo
,topomerge
,以及topoquantize
。啊,我想这可能与此有关。。。?不知道我实际上应该安装什么,npm install topojson client
也没有运行topojson
或topojson client
,文档中没有任何内容……谢谢,但我真的很想在本地运行它!