yo generator卡住了 - TypeError:无法读取null的属性'addListener'

时间:2015-06-02 16:48:15

标签: npm yeoman yeoman-generator yo

我正在尝试创建自己的简单“Hello World”自耕农生成器。 非常简单的一个。

我已经安装了yeoman generator

npm install -g generator-generator

然后我试着去运行它。

yo generator
     _-----_
    |       |    .--------------------------.
    |--(o)--|    |  Create your own Yeoman  |
   `---------´   |      generator with      |
    ( _´U`_ )    |       superpowers!       |
    /___A___\    '--------------------------'
     |  ~  |     
   __'.___.'__   
 ´   `  |° ´ Y ` 

? Would you mind telling me your username on GitHub? my-name
? What's the base name of your generator? test

我在这里差不多10分钟......

然后,我决定杀死它 - control + c,我明白了。

/usr/local/lib/node_modules/yo/node_modules/inquirer/node_modules/rx/dist/rx.js:579
    throw e;
          ^
TypeError: Cannot read property 'addListener' of null
    at Function.Observable.fromEvent (/usr/local/lib/node_modules/yo/node_modules/inquirer/node_modules/rx/dist/rx.async.js:426:16)
    at module.exports (/usr/local/lib/node_modules/yo/node_modules/inquirer/lib/utils/events.js:9:25)
    at Prompt._run (/usr/local/lib/node_modules/yo/node_modules/inquirer/lib/prompts/confirm.js:60:16)
    at Prompt.run (/usr/local/lib/node_modules/yo/node_modules/inquirer/lib/prompts/base.js:71:8)
    at Object.<anonymous> (/usr/local/lib/node_modules/yo/node_modules/inquirer/lib/ui/prompt.js:96:12)
    at Object.utils.runAsync (/usr/local/lib/node_modules/yo/node_modules/inquirer/lib/utils/utils.js:29:22)
    at /usr/local/lib/node_modules/yo/node_modules/inquirer/lib/utils/utils.js:51:13
    at tryCatcher (/usr/local/lib/node_modules/yo/node_modules/inquirer/node_modules/rx/dist/rx.js:567:29)
    at setDisposable (/usr/local/lib/node_modules/yo/node_modules/inquirer/node_modules/rx/dist/rx.js:5233:36)
    at AnonymousObservable.s [as _subscribe] (/usr/local/lib/node_modules/yo/node_modules/inquirer/node_modules/rx/dist/rx.js:5250:11)  

有些人遇到同样的问题:here

任何提示/建议?

0 个答案:

没有答案