winston
version?_winston@3
winston@2
node -v
outputs:_> node -v
v14.2.0
Ubuntu 18.04(wsl 1)
while start program, have a warning showed.
i. node --trace-warnings core.js
ii. show the blow
(node:26972) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:817:11)
at Object.get (internal/modules/cjs/loader.js:831:5)
at Object.exports.setLevels (/mnt/d/Programs/Hitokoto_Api/node_modules/winston/lib/winston/common.js:35:14)
at Object.<anonymous> (/mnt/d/Programs/Hitokoto_Api/node_modules/winston/lib/winston.js:83:8)
at Module._compile (internal/modules/cjs/loader.js:1176:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1196:10)
at Module.load (internal/modules/cjs/loader.js:1040:32)
at Function.Module._load (internal/modules/cjs/loader.js:929:14)
at Module.require (internal/modules/cjs/loader.js:1080:19)
at require (internal/modules/cjs/helpers.js:72:18)
with no warning
Cause it seems like it's not going to be fixed/merged anytime soon and I really don't want to migrate to winston@3, I've created forked npm package - https://www.npmjs.com/package/winston24. This is just [email protected] with fix for this warning applied and bumped to version 2.4.5. Published from this branch: https://github.com/rysenko/winston/commits/2.x
Fixed via https://github.com/winstonjs/winston/pull/1800 and a 2.4.5 release should be cut shortly. Thanks. Consider upgrading to winston 3 which is maintained and tested against the latest Node versions.
I'm still facing this issue, ive updated to @2.4.5 in my node modules and reinstalled, it still crashes but with no warning this time
Most helpful comment
Fixed via https://github.com/winstonjs/winston/pull/1800 and a 2.4.5 release should be cut shortly. Thanks. Consider upgrading to winston 3 which is maintained and tested against the latest Node versions.