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

TypeError: Cannot set property 'isLevelEnabled' of undefined #62

Open
DavidRadan opened this issue Jul 8, 2018 · 10 comments
Open

TypeError: Cannot set property 'isLevelEnabled' of undefined #62

DavidRadan opened this issue Jul 8, 2018 · 10 comments

Comments

@DavidRadan
Copy link

DavidRadan commented Jul 8, 2018

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. (c:(!) Projects2018\GearmanNode\node_modules\gearmanode\lib\gearmanode.js:41:41)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object. (c:(!) Projects2018\GearmanNode\Client.js:1:81)
at Module._compile (internal/modules/cjs/loader.js:686:14)

@aledefreitas
Copy link

aledefreitas commented Jul 23, 2018

@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.

@DavidRadan
Copy link
Author

Hi aledefreitas ,

Many thanks for the solution but we decided to build our own solution based on node.js .

Regards,

@rkmax
Copy link

rkmax commented Jul 31, 2018

I have lost couple hours with this, I think a < 3.0 will be great on the dependencies

@DavidRadan
Copy link
Author

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

@mike442144
Copy link
Contributor

@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.

@kvelaro
Copy link

kvelaro commented Feb 8, 2019

@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

@rowntreerob
Copy link

@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

@kvelaro
Copy link

kvelaro commented Sep 6, 2022

Sorry your solution is not working with winston anymore with newer nodejs. Is there any development?

@tiehumobilenow
Copy link

tiehumobilenow commented Mar 4, 2023

"winston": "^0.7.1",
Thanks!!

Succes in Node.js v18.12.1

@SeaJungg
Copy link

SeaJungg commented Apr 18, 2023

[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

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

No branches or pull requests

8 participants