哟聚合物构建错误

yo polymer building error

我刚刚更新了我的 Polymer 开发工具,但出现了一些错误,尽管之前一切正常。这是我在控制台中尝试“yo polymer”时得到的结果:

/usr/lib/node_modules/generator-polymer/node_modules/yeoman-generator/lib/base.js:444 this.env.sharedFs.on('change', writeFiles); ^ TypeError: Object # has no method 'on' at run (/usr/lib/node_modules/generator-polymer/node_modules/yeoman-generator/lib/base.js:444:21) at Environment.run (/usr/lib/node_modules/yo/node_modules/yeoman-environment/lib/environment.js:330:20) at /usr/lib/node_modules/yo/lib/cli.js:91:9 at Environment.resolver.lookup (/usr/lib/node_modules/yo/node_modules/yeoman-environment/lib/resolver.js:50:12) at init (/usr/lib/node_modules/yo/lib/cli.js:66:7) at pre (/usr/lib/node_modules/yo/lib/cli.js:53:3) at Object. (/usr/lib/node_modules/yo/lib/cli.js:155:1) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32)

或者当我在控制台中输入“yo”并选择“polymer”时:

/usr/lib/node_modules/yo/node_modules/inquirer/node_modules/rx/dist/rx.all.js:9379 throw e; ^ TypeError: Object # has no method 'on' at run (/usr/lib/node_modules/generator-polymer/node_modules/yeoman-generator/lib/base.js:444:21) at Environment.run (/usr/lib/node_modules/yo/node_modules/yeoman-environment/lib/environment.js:330:20) at module.exports (/usr/lib/node_modules/yo/lib/routes/run.js:20:11) at Router.navigate (/usr/lib/node_modules/yo/lib/router.js:36:30) at PromptUI.completed (/usr/lib/node_modules/yo/lib/routes/home.js:76:20) at PromptUI.onCompletion (/usr/lib/node_modules/yo/node_modules/inquirer/lib/ui/prompt.js:69:10) at AnonymousObserver.Rx.AnonymousObserver.AnonymousObserver.completed (/usr/lib/node_modules/yo/node_modules/inquirer/node_modules/rx/dist/rx.all.js:1965:12) at AnonymousObserver.Rx.internals.AbstractObserver.AbstractObserver.onCompleted (/usr/lib/node_modules/yo/node_modules/inquirer/node_modules/rx/dist/rx.all.js:1902:14) at AutoDetachObserverPrototype.completed (/usr/lib/node_modules/yo/node_modules/inquirer/node_modules/rx/dist/rx.all.js:9397:23) at AutoDetachObserver.Rx.internals.AbstractObserver.AbstractObserver.onCompleted >(/usr/lib/node_modules/yo/node_modules/inquirer/node_modules/rx/dist/rx.all.js:1902:14)

知道更新什么时候出错(没有抛出错误)。

感谢阅读,祝一切顺利。

PS : 我 运行 在

更新哟(npm install -g 哟)。我遇到了同样的问题。