{"action":"closed","issue":{"url":"https://api.github.com/repos/maxogden/multiplex/issues/21","labels_url":"https://api.github.com/repos/maxogden/multiplex/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/maxogden/multiplex/issues/21/comments","events_url":"https://api.github.com/repos/maxogden/multiplex/issues/21/events","html_url":"https://github.com/maxogden/multiplex/issues/21","id":88514681,"number":21,"title":"Bug: invalid invocation of 'events' module, breaks in node 0.10","user":{"login":"klyngbaek","id":1141378,"avatar_url":"https://avatars.githubusercontent.com/u/1141378?v=3","gravatar_id":"","url":"https://api.github.com/users/klyngbaek","html_url":"https://github.com/klyngbaek","followers_url":"https://api.github.com/users/klyngbaek/followers","following_url":"https://api.github.com/users/klyngbaek/following{/other_user}","gists_url":"https://api.github.com/users/klyngbaek/gists{/gist_id}","starred_url":"https://api.github.com/users/klyngbaek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klyngbaek/subscriptions","organizations_url":"https://api.github.com/users/klyngbaek/orgs","repos_url":"https://api.github.com/users/klyngbaek/repos","events_url":"https://api.github.com/users/klyngbaek/events{/privacy}","received_events_url":"https://api.github.com/users/klyngbaek/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-15T19:17:54Z","updated_at":"2015-06-15T19:24:05Z","closed_at":"2015-06-15T19:24:05Z","body":"Multiplex calls the method [`Class Method: EventEmitter.listenerCount(emitter, event)`](https://nodejs.org/docs/v0.12.4/api/events.html#events_class_method_eventemitter_listenercount_emitter_event) on a variable `events` which is defined in [line 3](https://github.com/maxogden/multiplex/blob/master/index.js) as:\r\n\r\n    var events = require('events')\r\n\r\nFrom the `multiplex` code it looks like `events` is supposed to be an `EventEmitter` instance. I think the proper way to user the `events` package is like this:\r\n\r\n[`var events = require('events').EventEmitter`](https://github.com/Gozala/events)\r\n\r\nnot \r\n\r\n`var events = require('events') // how it is now`\r\n\r\nThis can cause a problem in node 0.10, because in this case `require('events')` does not have all the methods defined on it. You need to access the underlying `EventEmitter` object. An example of the error is in this build (at the very bottom):\r\n[https://travis-ci.org/substack/dataplex/builds/66828146](https://travis-ci.org/substack/dataplex/builds/66828146)\r\n\r\nPotential fix in the [`pull request`](https://github.com/maxogden/multiplex/pull/20) which works in node 0.12 and node 0.10."}}