The way how longjohn wraps EventEmitter is incompatible with other modules doing a similar/same wrapping.
I tested by creating a clone of longjohn (incl. modifiny the 'longjohn' property of on()) and used it together with unmodified longjohn in following script:
require('longjohn');
var assert = require('assert');
var EventEmitter = require('events').EventEmitter;
function onListener() {}
function onceListener() {}
function test() {
var emitter = new EventEmitter;
emitter.on('xxx', onListener);
emitter.once('xxx', onceListener);
assert.equal(emitter.listenerCount('xxx'), 2);
emitter.removeListener('xxx', onListener);
// fails on second call as onListener was not removed
assert.equal(emitter.listenerCount('xxx'), 1);
emitter.removeListener('xxx', onceListener);
assert.equal(emitter.listenerCount('xxx'), 0);
}
test();
require('longjohn-clone');
test();