connect-rest
connect-rest copied to clipboard
【bug】TypeError: winston.Logger is not a constructor
TypeError: winston.Logger is not a constructor at Object.exports.createWinstonLogger (E:\WWW\elevator_monitor\node_modules\connect-rest\lib\logger.js:25:9) at Object.exports.createLogger (E:\WWW\elevator_monitor\node_modules\connect-rest\lib\logger.js:5:91) at Object.exports.rester (E:\WWW\elevator_monitor\node_modules\connect-rest\lib\connect-rest.js:483:18) at ConnectApp.middleware (E:\WWW\elevator_monitor\gulpfile.js:178:26) at ConnectApp.handlers (E:\WWW\elevator_monitor\node_modules\gulp-connect\index.js:189:47) at ConnectApp.run (E:\WWW\elevator_monitor\node_modules\gulp-connect\index.js:68:10) at new ConnectApp (E:\WWW\elevator_monitor\node_modules\gulp-connect\index.js:57:10) at Object.server (E:\WWW\elevator_monitor\node_modules\gulp-connect\index.js:268:11) at connectServer (E:\WWW\elevator_monitor\gulpfile.js:173:13) at bound (domain.js:301:14)
i found a solution from https://stackoverflow.com/questions/51074805/typeerror-winston-logger-is-not-a-constructor-with-winston-and-morgan
and i changed node_module/connect-rest/lib/logger.js file like this:
"connect-rest": "^1.9.5",