matteoagosti / hubot-mail-notifier

A mail notifier plugin for hubot
4 stars 2 forks source link

Error attempting to run this plugin. #2

Open jjasghar opened 10 years ago

jjasghar commented 10 years ago

I'm attempting to walk through this and i'm getting this error starting up bin/hubot.

[Tue Nov 25 2014 16:58:55 GMT-0600 (CST)] ERROR Error loading scripts from npm package - TypeError: undefined is not a function
  at new MailListener (/Users/jasghar/repo/openstack-chef-bot/node_modules/hubot-mail-notifier/node_modules/mail-listener/dist/mail.listener.js:24:19)
  at module.exports (/Users/jasghar/repo/openstack-chef-bot/node_modules/hubot-mail-notifier/src/mail-notifier.coffee:47:3, <js>:53:20)
  at Robot.loadExternalScripts (/Users/jasghar/repo/openstack-chef-bot/node_modules/hubot/src/robot.coffee:256:11, <js>:208:39)
  at /Users/jasghar/repo/openstack-chef-bot/node_modules/hubot/bin/hubot:113:13, <js>:122:28
  at fs.js:271:14
  at Object.oncomplete (fs.js:107:15)

It looks like it doesnt like how this line: https://github.com/matteoagosti/hubot-mail-notifier/blob/master/src/mail-notifier.coffee#L47 Can't seem to create the config object?

Any suggestions on what i can to do to fix this? Thanks in advance!

gerbenk commented 9 years ago

The cause is a deprecated field in the Imap Library. mail-listener was updated to mail-listener2 to fix this. See: https://github.com/circuithub/mail-listener/issues/30

I also had to change hubot-mail-notifier a bit and change "mail:parsed" to just "mail".