Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get EventEmitter correctly #521

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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