something in logger causing error about self._addDefaultMeta
See original GitHub issueI am using a node plugin https://github.com/mhartington/nvim-typescript which requires the node host. when I use one of the functions there I get the following error in the node log…
{"message":"Error in plugin for command:TSGetDiagnostics: self._addDefaultMeta is not a function (file: /Users/Jeff/.config/nvim/plugged/nvim-typescript/rplugin/node/nvim_typescript, stack: TypeError: self._addDefaultMeta is not a function\n at Object.DerivedLogger.<computed> [as warn] (/Users/Jeff/.config/yarn/global/node_modules/winston/lib/winston/create-logger.js:80:14)\n at Object.getDiagnostics (/Users/Jeff/.config/nvim/plugged/nvim-typescript/rplugin/node/nvim_typescript/lib/index.js:1:24189)\n at Object.fn (/Users/Jeff/.config/yarn/global/node_modules/neovim/lib/host/NvimPlugin.js:19:26)\n at NvimPlugin.<anonymous> (/Users/Jeff/.config/yarn/global/node_modules/neovim/lib/host/NvimPlugin.js:155:41)\n at Generator.next (<anonymous>)\n at /Users/Jeff/.config/yarn/global/node_modules/neovim/lib/host/NvimPlugin.js:8:71\n at new Promise (<anonymous>)\n at __awaiter (/Users/Jeff/.config/yarn/global/node_modules/neovim/lib/host/NvimPlugin.js:4:12)\n at NvimPlugin.handleRequest (/Users/Jeff/.config/yarn/global/node_modules/neovim/lib/host/NvimPlugin.js:133:16)\n at Host.<anonymous> (/Users/Jeff/.config/yarn/global/node_modules/neovim/lib/host/index.js:71:27))","level":"error"}
It seems someone else has seen the error as well in #154. It looks like #139 is probably the same issue too. I looked into the library where this is coming from and there also seems to be some issues there https://github.com/winstonjs/winston/issues/1591 and https://github.com/winstonjs/winston/issues/1577. I looked through the files a little bit here but I cannot see the exact reason why this is happening in neovim’s node client.
I haven’t been using node for a while and I just updated everything to dust off an old project when I ran into this error. Does anyone see why this would be happening?
If I use the chrome debugger I run into the following console error, I am unsure if it is related or not…
internal/process/warning.js:33 (node:17278) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top GitHub Comments
Yeah I think winston was chosen so that we could use different transports
Alright, will submit a PR with the winston locked version and the yarn.lock file.
edit: Oh it seems the repo is using lerna, so I guess the top-level yarn.lock file is being used.