Skip to content

Conversation

HebaruSan
Copy link

@HebaruSan HebaruSan commented Sep 14, 2017

atom-irc is erroring out currently at this line:

util.inherits(Client, EventEmitter);

TypeError: The super constructor to "inherits" must not be null or undefined

The documentation for inherits says that the "super constructor" is the second parameter, so this error implies that EventEmitter is null or undefined. I checked the documentation, and it says:

const EventEmitter = require('events');

But node-irc currently does this instead:

var EventEmitter = require('events').EventEmitter;

If I remove the trailing .EventEmitter as in this pull request, the error in atom-irc is resolved.

EventEmitter is now the root level object of require('events') according to https://nodejs.org/api/events.html
@Jmots2
Copy link

Jmots2 commented Sep 21, 2017

Was fixed at one time earlier; apparent proper fix: #281

https://github.com/martynsmith/node-irc/commit/0fd26a791710ff343815e6dc8e362e532fa40588

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants