{"action":"created","issue":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/2966","labels_url":"https://api.github.com/repos/sequelize/sequelize/issues/2966/labels{/name}","comments_url":"https://api.github.com/repos/sequelize/sequelize/issues/2966/comments","events_url":"https://api.github.com/repos/sequelize/sequelize/issues/2966/events","html_url":"https://github.com/sequelize/sequelize/issues/2966","id":54830477,"number":2966,"title":"Sequelize does not work in io.js","user":{"login":"yosuke-furukawa","id":555645,"avatar_url":"https://avatars.githubusercontent.com/u/555645?v=3","gravatar_id":"","url":"https://api.github.com/users/yosuke-furukawa","html_url":"https://github.com/yosuke-furukawa","followers_url":"https://api.github.com/users/yosuke-furukawa/followers","following_url":"https://api.github.com/users/yosuke-furukawa/following{/other_user}","gists_url":"https://api.github.com/users/yosuke-furukawa/gists{/gist_id}","starred_url":"https://api.github.com/users/yosuke-furukawa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yosuke-furukawa/subscriptions","organizations_url":"https://api.github.com/users/yosuke-furukawa/orgs","repos_url":"https://api.github.com/users/yosuke-furukawa/repos","events_url":"https://api.github.com/users/yosuke-furukawa/events{/privacy}","received_events_url":"https://api.github.com/users/yosuke-furukawa/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sequelize/sequelize/labels/bug","name":"bug","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2015-01-20T00:47:58Z","updated_at":"2015-01-21T09:28:13Z","closed_at":null,"body":"# Problem\r\n\r\nI am trying to use io.js in my production.\r\nI got a following error in a sequelize module.\r\n\r\n```\r\nTypeError: undefined is not a function\r\n     at Promise.addListener (events.js:154:18)\r\n     at Promise.on (/Users/yosuke/go/src/github.com/yosuke-furukawa/Hexi/node_modules/sequelize/lib/promise.js:118:31)\r\n     at Promise.<anonymous> (/Users/yosuke/go/src/github.com/yosuke-furukawa/Hexi/node_modules/sequelize/lib/promise.js:268:10)\r\n     at Array.forEach (native)\r\n     at Promise.proxy (/Users/yosuke/go/src/github.com/yosuke-furukawa/Hexi/node_modules/sequelize/lib/promise.js:267:18)\r\n     at Promise.proxySql (/Users/yosuke/go/src/github.com/yosuke-furukawa/Hexi/node_modules/sequelize/lib/promise.js:278:15)\r\n     at Promise._then (/Users/yosuke/go/src/github.com/yosuke-furukawa/Hexi/node_modules/sequelize/lib/promise.js:57:10)\r\n     at Promise$then [as then] (/Users/yosuke/go/src/github.com/yosuke-furukawa/Hexi/node_modules/sequelize/node_modules/bluebird/js/main/promise.js:153:17)\r\n     at Promise.error.Promise.failure.Promise.fail (/Users/yosuke/go/src/github.com/yosuke-furukawa/Hexi/node_modules/sequelize/lib/promise.js:200:15)\r\n```\r\n\r\n# cause\r\n\r\nSequelize/Promise calls EventEmitter.prototype.addEventListener directly. \r\n[https://github.com/sequelize/sequelize/blob/master/lib/promise.js#L127](https://github.com/sequelize/sequelize/blob/master/lib/promise.js#L127)\r\n\r\nio.js has new method, `getMaxListeners` and the method is called in EventEmitter.prototype.addEventListener.\r\n[https://github.com/iojs/io.js/blob/v1.x/lib/events.js#L154](https://github.com/iojs/io.js/blob/v1.x/lib/events.js#L154)\r\n\r\n# solution\r\n\r\nSequelize/Promise need to inherit EventEmitter methods.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/comments/70807618","html_url":"https://github.com/sequelize/sequelize/issues/2966#issuecomment-70807618","issue_url":"https://api.github.com/repos/sequelize/sequelize/issues/2966","id":70807618,"user":{"login":"mickhansen","id":699049,"avatar_url":"https://avatars.githubusercontent.com/u/699049?v=3","gravatar_id":"","url":"https://api.github.com/users/mickhansen","html_url":"https://github.com/mickhansen","followers_url":"https://api.github.com/users/mickhansen/followers","following_url":"https://api.github.com/users/mickhansen/following{/other_user}","gists_url":"https://api.github.com/users/mickhansen/gists{/gist_id}","starred_url":"https://api.github.com/users/mickhansen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mickhansen/subscriptions","organizations_url":"https://api.github.com/users/mickhansen/orgs","repos_url":"https://api.github.com/users/mickhansen/repos","events_url":"https://api.github.com/users/mickhansen/events{/privacy}","received_events_url":"https://api.github.com/users/mickhansen/received_events","type":"User","site_admin":false},"created_at":"2015-01-21T09:28:13Z","updated_at":"2015-01-21T09:28:13Z","body":"@sdepold yep :) just waiting for travis to integrate it."}}