Hello everyone!
I am watching mastering React and in Calling Backend Services lecture, I am trying to do ‘node index.js’ however I ran into the below error. does anyone knows how to solve this issue? I spent hours and hours but still couldn’t fix.
Deprecated: .handleExceptions() will be removed in winston@4. Use .exceptions.handle()
{“date”:“Tue Oct 25 2022 16:08:11 GMT-0700 (Pacific Daylight Time)”,“error”:{},“exception”:true,“level”:“error”,“message”:“uncaughtException: Invalid transport, must be an object with a log method.\nError: Invalid transport, must be an object with a log method.\n at new LegacyTransportStream (C:\vidly-api-node\node_modules\winston-transport\legacy.js:18:11)\n at DerivedLogger.add (C:\vidly-api-node\node_modules\winston\lib\winston\logger.js:352:11)\n at Object.exports. [as add] (C:\vidly-api-node\node_modules\winston\lib\winston.js:105:68)\n at module.exports (C:\vidly-api-node\startup\logging.js:14:11)\n at Object. (C:\vidly-api-node\index.js:6:29)\n at Module._compile (node:internal/modules/cjs/loader:1126:14)\n at Object.Module._extensions…js (node:internal/modules/cjs/loader:1180:10)\n at Module.load (node:internal/modules/cjs/loader:1004:32)\n at Function.Module._load (node:internal/modules/cjs/loader:839:12)\n at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)”,“os”:{“loadavg”:[0,0,0],“uptime”:13890},“process”:{“argv”:[“C:\Program Files\nodejs\node.exe”,“C:\vidly-api-node\index.js”],“cwd”:“C:\vidly-api-node”,“execPath”:“C:\Program Files\nodejs\node.exe”,“gid”:null,“memoryUsage”:{“arrayBuffers”:187200,“external”:1838541,“heapTotal”:17854464,“heapUsed”:10564656,“rss”:36831232},“pid”:17428,“uid”:null,“version”:“v16.17.0”},“stack”:“Error: Invalid transport, must be an object with a log method.\n at new LegacyTransportStream (C:\vidly-api-node\node_modules\winston-transport\legacy.js:18:11)\n at DerivedLogger.add (C:\vidly-api-node\node_modules\winston\lib\winston\logger.js:352:11)\n at Object.exports. [as add] (C:\vidly-api-node\node_modules\winston\lib\winston.js:105:68)\n at module.exports (C:\vidly-api-node\startup\logging.js:14:11)\n at Object. (C:\vidly-api-node\index.js:6:29)\n at Module._compile (node:internal/modules/cjs/loader:1126:14)\n at Object.Module._extensions…js (node:internal/modules/cjs/loader:1180:10)\n at Module.load (node:internal/modules/cjs/loader:1004:32)\n at Function.Module._load (node:internal/modules/cjs/loader:839:12)\n at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)”,“trace”:[{“column”:11,“file”:“C:\vidly-api-node\node_modules\winston-transport\legacy.js”,“function”:“new LegacyTransportStream”,“line”:18,“method”:null,“native”:false},{“column”:11,“file”:“C:\vidly-api-node\node_modules\winston\lib\winston\logger.js”,“function”:“DerivedLogger.add”,“line”:352,“method”:“add”,“native”:false},{“column”:68,“file”:“C:\vidly-api-node\node_modules\winston\lib\winston.js”,“function”:“Object.exports. [as add]”,“line”:105,“method”:“ [as add]”,“native”:false},{“column”:11,“file”:“C:\vidly-api-node\startup\logging.js”,“function”:“module.exports”,“line”:14,“method”:“exports”,“native”:false},{“column”:29,“file”:“C:\vidly-api-node\index.js”,“function”:null,“line”:6,“method”:null,“native”:false},{“column”:14,“file”:“node:internal/modules/cjs/loader”,“function”:“Module._compile”,“line”:1126,“method”:“_compile”,“native”:false},{“column”:10,“file”:“node:internal/modules/cjs/loader”,“function”:“Module._extensions…js”,“line”:1180,“method”:“.js”,“native”:false},{“column”:32,“file”:“node:internal/modules/cjs/loader”,“function”:“Module.load”,“line”:1004,“method”:“load”,“native”:false},{“column”:12,“file”:“node:internal/modules/cjs/loader”,“function”:“Module._load”,“line”:839,“method”:“_load”,“native”:false},{“column”:12,“file”:“node:internal/modules/run_main”,“function”:“Function.executeUserEntryPoint [as runMain]”,“line”:81,“method”:“executeUserEntryPoint [as runMain]”,“native”:false}]}