When i want to start the web server this error apears "winston: exitOnError cannot be true with no exception handlers." and the server not starting, how to fix this issue

module.exports = function() {

new winston.transports.Console({ exitOnError : false, colorize: true, prettyPrint: true}),
new winston.transports.File({ filename: 'uncaughtExceptions.log' }));

process.on(‘unhandledRejection’, (ex) => {
throw ex;


It looks like you are doing this:

winston.exceptions.handle()(/* your transports */);

But I think you should be doing this:

winston.exceptions.handle(/* your transports */);