Haresh Vidja Haresh Vidja - 1 year ago 512
Node.js Question

How to Fix ? DeprecationWarning: 'GLOBAL' is deprecated, use 'global'

How to fix Depricated warning message

(node:6136) DeprecationWarning: 'GLOBAL' is deprecated, use 'global'

In my code I haev used something like below

// initializing globals
GLOBAL.user_session= {};
GLOBAL.config= require('./config/config.js');

So how to fix warning message?

Answer Source
global.user_session= {};
global.config= require('./config/config.js');
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download