今天,我开始了一个与 Twitch.TV 的聊天服务器一起使用的新项目(IRC Bot 等)。
我想使用在 Atmosphere 上找到的 accounts-twitch 包,但由于不推荐使用对 accounts-oauth2-helper 的依赖,因此不得不手动安装它(编辑 package.js 文件)。
正确安装后,我的应用程序现在在启动时崩溃。它在死前抛出以下错误,我不知道如何解决它:
[[[[[ ~/projects/wasdbot ]]]]]
=> Started MongoDB.
=> Starting your app...
W20140605-15:22:42.283(-4)? (STDERR)
W20140605-15:22:42.350(-4)? (STDERR) /home/misutowolf/.meteor/tools/5bf1690853/lib/node_modules/fibers/future.js:173
W20140605-15:22:42.350(-4)? (STDERR) throw(ex);
W20140605-15:22:42.350(-4)? (STDERR) ^
W20140605-15:22:42.351(-4)? (STDERR) TypeError: Cannot call method 'registerService' of undefined
W20140605-15:22:42.351(-4)? (STDERR) at Package (packages/accounts-twitch/twitch_server.js:2)
W20140605-15:22:42.351(-4)? (STDERR) at Package (packages/accounts-twitch/twitch_server.js:82)
W20140605-15:22:42.351(-4)? (STDERR) at packages/accounts-twitch.js:123:4
W20140605-15:22:42.351(-4)? (STDERR) at packages/accounts-twitch.js:130:3
W20140605-15:22:42.352(-4)? (STDERR) at /home/misutowolf/projects/wasdbot/.meteor/local/build/programs/server/boot.js:155:10
W20140605-15:22:42.352(-4)? (STDERR) at Array.forEach (native)
W20140605-15:22:42.352(-4)? (STDERR) at Function._.each._.forEach (/home/misutowolf/.meteor/tools/5bf1690853/lib/node_modules/underscore/underscore.js:79:11)
W20140605-15:22:42.352(-4)? (STDERR) at /home/misutowolf/projects/wasdbot/.meteor/local/build/programs/server/boot.js:82:5
=> Exited with code: 8
W20140605-15:22:43.456(-4)? (STDERR)
W20140605-15:22:43.457(-4)? (STDERR) /home/misutowolf/.meteor/tools/5bf1690853/lib/node_modules/fibers/future.js:173
W20140605-15:22:43.457(-4)? (STDERR) throw(ex);
W20140605-15:22:43.458(-4)? (STDERR) ^
W20140605-15:22:43.463(-4)? (STDERR) TypeError: Cannot call method 'registerService' of undefined
W20140605-15:22:43.463(-4)? (STDERR) at Package (packages/accounts-twitch/twitch_server.js:2)
W20140605-15:22:43.464(-4)? (STDERR) at Package (packages/accounts-twitch/twitch_server.js:82)
W20140605-15:22:43.464(-4)? (STDERR) at packages/accounts-twitch.js:123:4
W20140605-15:22:43.464(-4)? (STDERR) at packages/accounts-twitch.js:130:3
W20140605-15:22:43.465(-4)? (STDERR) at /home/misutowolf/projects/wasdbot/.meteor/local/build/programs/server/boot.js:155:10
W20140605-15:22:43.465(-4)? (STDERR) at Array.forEach (native)
W20140605-15:22:43.465(-4)? (STDERR) at Function._.each._.forEach (/home/misutowolf/.meteor/tools/5bf1690853/lib/node_modules/underscore/underscore.js:79:11)
W20140605-15:22:43.466(-4)? (STDERR) at /home/misutowolf/projects/wasdbot/.meteor/local/build/programs/server/boot.js:82:5
=> Exited with code: 8
W20140605-15:22:44.622(-4)? (STDERR)
W20140605-15:22:44.624(-4)? (STDERR) /home/misutowolf/.meteor/tools/5bf1690853/lib/node_modules/fibers/future.js:173
W20140605-15:22:44.625(-4)? (STDERR) throw(ex);
W20140605-15:22:44.625(-4)? (STDERR) ^
W20140605-15:22:44.628(-4)? (STDERR) TypeError: Cannot call method 'registerService' of undefined
W20140605-15:22:44.629(-4)? (STDERR) at Package (packages/accounts-twitch/twitch_server.js:2)
W20140605-15:22:44.629(-4)? (STDERR) at Package (packages/accounts-twitch/twitch_server.js:82)
W20140605-15:22:44.630(-4)? (STDERR) at packages/accounts-twitch.js:123:4
W20140605-15:22:44.630(-4)? (STDERR) at packages/accounts-twitch.js:130:3
W20140605-15:22:44.630(-4)? (STDERR) at /home/misutowolf/projects/wasdbot/.meteor/local/build/programs/server/boot.js:155:10
W20140605-15:22:44.631(-4)? (STDERR) at Array.forEach (native)
W20140605-15:22:44.631(-4)? (STDERR) at Function._.each._.forEach (/home/misutowolf/.meteor/tools/5bf1690853/lib/node_modules/underscore/underscore.js:79:11)
W20140605-15:22:44.631(-4)? (STDERR) at /home/misutowolf/projects/wasdbot/.meteor/local/build/programs/server/boot.js:82:5
=> Exited with code: 8
=> Your application is crashing. Waiting for file change.
似乎问题是在 twitch_server.js 中对 Accounts.oauth.registerService 的调用,但我真的不知道如何修复它。
我似乎也无法在他们的 API 文档中找到任何关于这个 oauth 的东西,或者我在错误的地方寻找,或者我错过了我应该包含的包?
截至目前,我添加到我的项目中的只是accounts-twitch、accounts-ui和coffeescript。我还没有写任何代码,只是想启动 Meteor。
任何帮助都会很棒。我真的很感谢大家事先的时间。