GearmaNode
GearmaNode copied to clipboard
TypeError: Cannot set property 'isLevelEnabled' of undefined
Hi There, It seems that this repository doesn't work anymore because of the "winston" plugin which has been changed , It could be great if you could fix these issues , at least update this plugin so that the plugin will be useful again.
Tested with latest node 10.6.0 .
Thanks in advanced .
var gearmanode2 = require('gearmanode');
//gearmanode.Client.logger.transports.console.level = 'info';
var client = gearmanode2.client({servers:[{host: '192.168.0.70', port: 4730}]});
var job = client.submitJob('reverse', 'hello world!');
job.on('workData', function(data) {
console.log('WORK_DATA >>> ' + data);
});
job.on('complete', function() {
console.log('RESULT >>> ' + job.response);
client.close();
});
[winston] Attempt to write logs with no transports %j
logger.js:202
Object {level: "info", message: "GearmaNode %s, running on Node.js %s [%s %s], with…", Symbol(level): "info", Symbol(splat): Array(5)}
logger.js:202
TypeError: Cannot set property 'isLevelEnabled' of undefined
gearmanode.js:41
at Object.
@DavidRadan
If you want to fix this issue you can add to your project's dependencies:
"dependencies": {
"winston": "^0.7.1",
}
Or do a npm install --save [email protected]
, since it is the last version Gearmanode had compatibility with winston. That should solve your problem as it solved mine.
Hi aledefreitas ,
Many thanks for the solution but we decided to build our own solution based on node.js .
Regards,
I have lost couple hours with this, I think a < 3.0 will be great on the dependencies
I think it would be wise to use other open source "queue" solution as this solution seems to be outdated . Building new solutions based on this technology can cause a huge headache in the future . Regards, David
@DavidRadan Actually, we have used this project for three years, it is so stable that we even no need to maintain. And it is not only a kind of "queue" solution, it enables you to do every thing distributed because of Gearman's protocol.
@DavidRadan
If you want to fix this issue you can add to your project's dependencies:
"dependencies": { "winston": "^0.7.1", }
Or do a
npm install --save [email protected]
, since it is the last version Gearmanode had compatibility with winston. That should solve your problem as it solved mine.
super, thanks
@DavidRadan thank you for solution to :
nooby w evaluation of gearmanode and winston that failed outta box on strange winston fails to init or construct class instance. "0.7.1" solved it for me
Sorry your solution is not working with winston anymore with newer nodejs. Is there any development?
"winston": "^0.7.1", Thanks!!
Succes in Node.js v18.12.1
[email protected] is too old..... My node server code wants to use new API on winston, but if installing that way, gearmanode gonna get error.. There is [email protected] https://github.com/winstonjs/winston