geddy命令在创建geddy应用程序后中断

时间:2012-05-31 07:39:18

标签: node.js geddy

我正在关注geddy tutorial

我安装了geddy& jake使用npm,创建应用程序,cd进入创建的文件夹,然后运行geddy命令。但是在运行geddy命令时出现错误,这是我的完整输出:

martin@crunchbang:~/code$ npm install geddy jake -g
/usr/local/bin/jake -> /usr/local/lib/node_modules/jake/bin/cli.js
/usr/local/bin/geddy -> /usr/local/lib/node_modules/geddy/bin/cli.js
jake@0.2.33 /usr/local/lib/node_modules/jake 
geddy@0.4.1 /usr/local/lib/node_modules/geddy 
martin@crunchbang:~/code$ geddy app geddy_todo
Created app geddy_todo.
martin@crunchbang:~/code$ cd geddy_todo/
martin@crunchbang:~/code/geddy_todo$ geddy

node.js:201
    throw e; // process.nextTick error, or 'error' event on first tick
          ^
TypeError: Object #<Object> has no method 'addListener'
at [object Object].<anonymous>           (/usr/local/lib/node_modules/geddy/lib/cluster/master.js:25:11)
at /usr/local/lib/node_modules/geddy/bin/cli.js:109:9
at Object.<anonymous> (/usr/local/lib/node_modules/geddy/bin/cli.js:181:5)
at Module._compile (module.js:432:26)
at Object..js (module.js:450:10)
at Module.load (module.js:351:31)
at Function._load (module.js:310:12)
at Array.0 (module.js:470:10)
at EventEmitter._tickCallback (node.js:192:40)
martin@crunchbang:~/code/geddy_todo$ 

运行这些命令后,geddy命令似乎在我运行的任何地方都被破坏了我得到以下内容:

martin@crunchbang:~$ geddy

node.js:201
    throw e; // process.nextTick error, or 'error' event on first tick
          ^
TypeError: Object #<Object> has no method 'addListener'
at [object Object].<anonymous> (/usr/local/lib/node_modules/geddy/lib/cluster/master.js:25:11)
at /usr/local/lib/node_modules/geddy/bin/cli.js:109:9
at Object.<anonymous> (/usr/local/lib/node_modules/geddy/bin/cli.js:181:5)
at Module._compile (module.js:432:26)
at Object..js (module.js:450:10)
at Module.load (module.js:351:31)
at Function._load (module.js:310:12)
at Array.0 (module.js:470:10)
at EventEmitter._tickCallback (node.js:192:40)

当我跑步时:

npm rm geddy jake

我得到了

martin@crunchbang:~$ sudo npm rm geddy jake
npm WARN Not installed in /home/martin/node_modules geddy
npm WARN Not installed in /home/martin/node_modules jake

我不确定接下来要尝试做什么?

1 个答案:

答案 0 :(得分:2)

听起来你没有安装最新版本的node和npm。我不能在这里肯定,但尝试卸载node和npm并从http://nodejs.org重新安装最新版本。

您需要确保将Geddy和Jake安装为全球套餐。

npm install -g geddy jake