这个
过程
是指
节点
. 尝试在index.js中添加未处理的弹出检查,或使用
proper winston exception handling
"use strict";
const winston = require('winston');
const myFormat = winston.format.printf(info => {
return `${info.timestamp} ${info.level}: ${info.message}`;
});
const logger = winston.createLogger({
level: "debug",
format: winston.format.combine(winston.format.timestamp(), myFormat),
transports: [
new winston.transports.File({filename: "logs/error.log", level: 'error'}),
new winston.transports.File({filename: 'logs/combined.log'}),
],
exceptionHandlers: [
new winston.transports.File({ filename: 'logs/exceptions.log' }),
new winston.transports.File({ filename: 'logs/combined.log' })
],
exitOnError: false,
});
process.on('unhandledRejection', (reason, promise) => {
logger.debug(reason);
});
process.on('uncaughtException', (err) => {
logger.debug(err);
});
但是,在package.json文件中查找index.js文件所在的目录。在“依赖关系”部分中查找节点池,并将其版本更改为“节点池”:“^3.4.2”,因为您描述的问题很可能已在3.1.8版本中修复。