我正在尝试创建自己的简单“Hello World”yeoman 生成器。非常简单的一个。
我已经安装了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)
有些人有同样的问题:这里
任何提示/建议?