self._addDefaultMeta is not a function error still occurs with 3.2.1
See original GitHub issuePlease tell us about your environment:
winston
version?-
winston@2
-
winston@3
-
node -v
outputs: 11.6.0- Operating System? OSX
- Language? ES6/7
What is the problem?
Seems like #1579 did not fully fix the _addDefaultMeta
bug. After upgrading to winston 3.2.1 I still get this error in my app at https://github.com/winstonjs/winston/blob/efd7baf65da13edaba7829aa4339757eed4322eb/lib/winston/create-logger.js#L80
Full stack trace:
TypeError: self._addDefaultMeta is not a function
at Object.DerivedLogger.(anonymous function) [as log] (/path/to/project/node_modules/winston/lib/winston/create-logger.js:80:14)
at module.exports.<anonymous> (/path/to/project/node_modules/sequelize-fixtures/lib/writer.js:39:16)
at module.exports.tryCatcher (/path/to/project/node_modules/bluebird/js/release/util.js:16:23)
at module.exports.writeFile (/path/to/project/node_modules/bluebird/js/release/method.js:15:34)
at updateReferences (/path/to/project/services/sample_data/index.js:919:6)
at Object.import (/path/to/project/services/sample_data/index.js:961:13)
What do you expect to happen instead?
That my app does not crash with the above error
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (3 by maintainers)
Top Results From Across the Web
Error after update winston to version 3.2.1. TypeError: self ...
TypeError: self. ... After I updated winston to version 3.2.1, I get an error while trying ... _addDefaultMeta is not a function at...
Read more >Uncaught TypeError | Is Not A Function | Solution - YouTube
Have you encountered an error like:- Uncaught TypeError- Some selector is not a function - jQuery is not a function - owlCarousel is...
Read more >[h3] [unhandled] H3Error: __vite_ssr_import_0__.defineStore ...
When installing the "pinia" package via npm i pinia , I got a bunch of errors, similar to what's described here. This seems...
Read more >Error after update winston to version 3.2.1. TypeError: self ... - Quabr
D:\Dev\MyProjectName\node_modules\winston\lib\winston\create-logger.js:80 self._addDefaultMeta(info); ^ TypeError: self._addDefaultMeta is not a function at ...
Read more >Error After Update Winston To Version 3.2.1 ... - TutorialMeta
Error After Update Winston To Version 3.2.1. TypeError: Self._addDefaultMeta Is Not A Function. node.js logging webpack winston. 27 October 2019 ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Another way I found that works is to bind:
Thanks for reporting this bug, but yes: the failure is by design. If you would like to create another object with it’s own properties that is still a logger, use
Object.create (logger, extraProps)