Closed epsicoin closed 9 years ago
var stratum = require('stratum');
var client = stratum.Client.$create();
client.on('mining.error', function(msg, socket) {
console.log(msg);
});
Thanks for your reply, but it's strange, i still got the same issue
TypeError: Object #<constructor> has no method 'on' at Object.<anonymous>
ah my bad, EventEmitter3 1.x had a breaking change, I'll have to update the lib. for now, change the package.json manually to use EventEmitter3 0.x or edit the lib/base.js
file from
}).$implement(require('eventemitter3').EventEmitter, true);
to
}).$implement(require('eventemitter3'), true);
Works better Thanks !
I've updated the code and released as 0.2.4, thanks for the report. It won't work for node 0.12 for now because the json-rpc2 dependency is broken on 0.12
Hello,
I used this in my code
var stratum = require('stratum'); var Client = stratum.Client; var client = Client.create(); client.on('mining.error', function(msg, socket) { console.log(msg); });
and when i launch i throw this error.
Any idea ?