node: 0.10.0
npm: 1.2.14
我已经设置了环境变量HUBOT_FLOWDOCK_LOGIN_EMAIL
和HUBOT_FLOWDOCK_LOGIN_PASSWORD
,然后尝试了以下。
从 hubot 站点拉下预建的 hubot。如上修改package.json。运行 npm 安装
添加
"hubot-flowdock": ">= 0.0.1",
就在我的依赖项下package.json
从 hubot-scripts.json 中删除了 redis
跑npm install
然后运行./bin/hubot -a flowdock -d
有了这个实现,./bin/hubot - flowdock
产生以下堆栈跟踪:
TypeError: Uncaught, unspecified "error" event.
at TypeError (<anonymous>)
at Session.EventEmitter.emit (events.js:74:15)
at Request._callback (/Users/gb/workspace/hubot-2.2.0/node_modules/hubot-flowdock/node_modules/flowdock/lib/flowdock.js:49:17)
at Request.self.callback (/Users/gb/workspace/hubot-2.2.0/node_modules/hubot-flowdock/node_modules/flowdock/node_modules/request/main.js:122:22)
at Request.EventEmitter.emit (events.js:98:17)
at Request.<anonymous> (/Users/gb/workspace/hubot-2.2.0/node_modules/hubot-flowdock/node_modules/flowdock/node_modules/request/main.js:661:16)
at Request.EventEmitter.emit (events.js:117:20)
at IncomingMessage.<anonymous> (/Users/gb/workspace/hubot-2.2.0/node_modules/hubot-flowdock/node_modules/flowdock/node_modules/request/main.js:623:14)
at IncomingMessage.EventEmitter.emit (events.js:117:20)
at _stream_readable.js:870:14
查看 /Users/gb/workspace/hubot-2.2.0/node_modules/hubot-flowdock/node_modules/flowdock/lib/flowdock.js:49:17,这是响应 statusCode > 300 的失败。
到现在为止还挺好。将 console.log 添加到上面的行会产生未经授权的“401”。
如何?凭据是正确的(我经常使用该电子邮件/密码登录)。