Node.js Topojson使用错误

Node.js Topojson使用错误,node.js,cmd,npm,topojson,Node.js,Cmd,Npm,Topojson,嗨,我正在尝试使用Topojson将shapefile转换为Topojson文件。 当我尝试使用Topojson时,出现以下错误: C:\>topojson fs.js:0 (function (exports, require, module, __filename, __dirname) { // Copyright Joy ^ Error: ENOENT, no such file or directory 'C:\dev\stdin' at Error (native) at Ob

嗨,我正在尝试使用Topojson将shapefile转换为Topojson文件。 当我尝试使用Topojson时,出现以下错误:

C:\>topojson
fs.js:0
(function (exports, require, module, __filename, __dirname) { // Copyright Joy
^
Error: ENOENT, no such file or directory 'C:\dev\stdin'
at Error (native)
at Object.fs.statSync (fs.js:797:18)
at Object.module.exports [as readFileSync] (C:\Users\admin\AppData\Roaming\n
pm\node_modules\topojson\node_modules\rw\lib\rw\read-file-sync.js:5:10)
at inputJson (C:\Users\admin\AppData\Roaming\npm\node_modules\topojson\bin\t
opojson:245:30)
at pop (C:\Users\admin\AppData\Roaming\npm\node_modules\topojson\node_module
s\queue-async\queue.js:24:14)
at Object.q.defer (C:\Users\admin\AppData\Roaming\npm\node_modules\topojson\
node_modules\queue-async\queue.js:55:11)
at C:\Users\admin\AppData\Roaming\npm\node_modules\topojson\bin\topojson:196
:5
at Array.forEach (native)
at Object.<anonymous> (C:\Users\admin\AppData\Roaming\npm\node_modules\topoj
son\bin\topojson:195:8)
at Module._compile (module.js:460:26)
C:\>topojson
财政司司长:0
(函数(导出、要求、模块、_文件名、_目录名){//版权所有)
^
错误:eNONT,没有这样的文件或目录“C:\dev\stdin”
错误(本机)
在Object.fs.statSync(fs.js:797:18)
在Object.module.exports[作为readFileSync](C:\Users\admin\AppData\Roaming\n
pm\node\u modules\topojson\node\u modules\rw\lib\rw\read file sync.js:5:10)
在inputJson(C:\Users\admin\AppData\Roaming\npm\node\u modules\topojson\bin\t
(电话:245:30)
在pop(C:\Users\admin\AppData\Roaming\npm\node\u modules\topojson\node\u module
s\queue async\queue.js:24:14)
在Object.q.defer(C:\Users\admin\AppData\Roaming\npm\node\u modules\topojson\
节点(模块\queue async\queue.js:55:11)
位于C:\Users\admin\AppData\Roaming\npm\node\u modules\topojson\bin\topojson:196
:5
at Array.forEach(本机)
在对象上。(C:\Users\admin\AppData\Roaming\npm\node\U modules\topoj
son\bin\topojson:195:8)
在模块处编译(Module.js:460:26)
我使用Windows7CMD来运行这个程序,我已经重新安装了topojson、nodejs和npm来尝试解决这个问题

我不明白程序为什么要在C:\dev\stdin中查找文件


有人能给我一些提示吗?提前谢谢

问题解决了:清理npm缓存并重新定义nodejs的路径对我来说很有效。遇到同样的问题-知道重新定义的路径是什么会很有用…我认为您将geojson文件的路径设置为null或错误会导致此错误。请尝试类似topojson-o uk.json--id属性SU_A3的方法--properties name=name--subunits.json places.json,请注意,'--'和'subunits.json'之间有一个'。