senecajs / seneca

A microservices toolkit for Node.js.
http://senecajs.org
MIT License
3.95k stars 314 forks source link

DeprecationWarning: 'root' is deprecated, use 'global' #566

Closed tswaters closed 7 years ago

tswaters commented 7 years ago

Started seeing this logged to the console not too long ago. Finally decided to add a trace and found:

(node:11504) DeprecationWarning: 'root' is deprecated, use 'global'
    at default_log_modifier (D:\Code\seneca-tests\node_modules\seneca\seneca.js:1555:39)
    at Seneca.log_modifier (D:\Code\seneca-tests\node_modules\seneca\seneca.js:1548:5)
    at Seneca.prepare_log_data [as log] (D:\Code\seneca-tests\node_modules\seneca\seneca.js:1529:9)
    at Seneca.log_modifier (D:\Code\seneca-tests\node_modules\seneca\seneca.js:1549:9)
    at Function.prepare_log_data [as debug] (D:\Code\seneca-tests\node_modules\seneca\seneca.js:1529:9)
    at Seneca.api_add [as add] (D:\Code\seneca-tests\node_modules\seneca\seneca.js:663:16)
    at make_seneca (D:\Code\seneca-tests\node_modules\seneca\seneca.js:1369:8)
    at init (D:\Code\seneca-tests\node_modules\seneca\seneca.js:193:16)
    at Context.before (D:\Code\seneca-tests\test\query.test.js:15:10)
    at callFnAsync (D:\Code\seneca-tests\node_modules\mocha\lib\runnable.js:362:21)
    at Hook.Runnable.run (D:\Code\seneca-tests\node_modules\mocha\lib\runnable.js:314:7)
    at next (D:\Code\seneca-tests\node_modules\mocha\lib\runner.js:303:10)
    at Immediate.<anonymous> (D:\Code\seneca-tests\node_modules\mocha\lib\runner.js:333:5)
    at runCallback (timers.js:574:20)
    at tryOnImmediate (timers.js:554:5)
    at processImmediate [as _immediateCallback] (timers.js:533:5)

Looks like 0a584ea moved default_log_modifier to outside make_senca and as a result root no longer points at the right thing - it points at global (for now) where id is not defined.

jorisroling commented 7 years ago

Is this project dead? It seems that this bug, even though the cause is found, does not get resolved. Anyone?

AntSworD commented 7 years ago

When fix?

tobiasmuecksch commented 7 years ago

I'm having the same issue

StarpTech commented 7 years ago

@jorisroling @tobiasmuecksch @AntSworD Before to talk about why nobody response to this issue I'm going to link to my project which is the result of this and more issues in seneca it has a very similiar API https://github.com/hemerajs/hemera My intention is not to advertise my project its opensource but I cant see anymore people who runs into issues and nobody cares about it.

xavierbabu commented 7 years ago

I am having the same issue

rjrodger commented 7 years ago

Oh yeah - this is a bad one - fix will be in 3.4.0