Nodejs: TypeError: The super constructor to “inherits“ must not be null or undefined

Recently, when using statsd, this sentence is util. Inherits (configurator, process. Event emitter); Error: “typeerror: the super constructor to” inherits “must not be null or undefined”

The reason is that there is no event emitter object in process in the newer nodejs version. The solution is to create an event emitter object for process before calling util. Inherits, as follows:

process.EventEmitter = require('events').EventEmitter

Read More: