[BUG] Errors on every load
Issues
- [X] I have checked existing issues and there are no issues with the same problem.
Plugin Version
- [X] I am using the latest version of the plugin
Neovim Version
- [X] I am using the 0.6 neovim version or later
Neovim Version
v0.10.1
Branch
master
Actual behavior
It produces duplicate text and errors the following:
input table: 0x7e1f54e2ad80 ...lazy/package-info.nvim/lua/package-info/virtual_text.lua:49: attempt to concatenate field 'version' (a nil value)
stack traceback:
^I...lazy/package-info.nvim/lua/package-info/virtual_text.lua:49: in function '__display_on_line'
^I...lazy/package-info.nvim/lua/package-info/virtual_text.lua:82: in function 'display'
^I...lazy/package-info.nvim/lua/package-info/actions/show.lua:44: in function 'on_success'
^I...im/lazy/package-info.nvim/lua/package-info/utils/job.lua:52: in function <...im/lazy/package-info.nvim/lua/package-info/utils/job.lua:41>
^I[C]: at 0x5941d8c58200
^I[C]: in function 'pcall'
^I/usr/share/nvim/runtime/lua/vim/ui.lua:101: in function 'input'
^I...ocal/share/nvim/lazy/nvim-tree.lua/lua/nvim-tree/lib.lua:238: in function 'prompt'
^I...y/nvim-tree.lua/lua/nvim-tree/actions/fs/remove-file.lua:133: in function <...y/nvim-tree.lua/lua/nvim-tree/actions/fs/remove-file.lua:107>
[NvimTree] /home/origami/Dev/projects/team/mindsurf/apps/website/.wrangler was properly removed.
[NvimTree] /home/origami/Dev/projects/team/mindsurf/apps/website/migrations was properly removed.
...lazy/package-info.nvim/lua/package-info/virtual_text.lua:49: attempt to concatenate field 'version' (a nil value)
stack traceback:
^I...lazy/package-info.nvim/lua/package-info/virtual_text.lua:49: in function '__display_on_line'
^I...lazy/package-info.nvim/lua/package-info/virtual_text.lua:82: in function 'display'
^I...lazy/package-info.nvim/lua/package-info/actions/show.lua:44: in function 'on_success'
^I...im/lazy/package-info.nvim/lua/package-info/utils/job.lua:52: in function <...im/lazy/package-info.nvim/lua/package-info/utils/job.lua:41> function: builtin#18 ...lazy/package-info.nvim/l
ua/package-info/virtual_text.lua:49: attempt to concatenate field 'version' (a nil value)
stack traceback:
^I...lazy/package-info.nvim/lua/package-info/virtual_text.lua:49: in function '__display_on_line'
Expected behavior
No errors
Steps to reproduce
Open package.json then move to another buffer, reopen package.json
Package info config
I am using lazy.nvim with the following config:
{
"vuki656/package-info.nvim",
event = "BufRead package.json",
dependencies = { "MunifTanjim/nui.nvim" },
config = true,
},
Other information
No response
Help
Yes, but I don't know how to start. I would need guidance (check question below)
Implementation help
No response
Hey, is this something that started happening recently or did you just install the plugin fresh?
If it's a fresh install, try removing event = "BufRead package.json",. That looks like something that might be the culprit
Hey, is this something that started happening recently or did you just install the plugin fresh?
If it's a fresh install, try removing
event = "BufRead package.json",. That looks like something that might be the culprit
Hey, sorry for the late response (GitHub notifications are a mess). But I've noticed this error happening after the recent updates. Although I did face some errors occasionally before that as well.
If I remove the event from the config, I still get the error when I try to move to another file named package.json which is different from the one I just opened. This is the error I get then:
E5108: Error executing lua: .../.local/share/nvim/lazy/ui/lua/nvchad/tabufline/init.lua:23: BufEnter Autocommands for "package.json": Vim(lua):E5108: Error executing lua ...lazy/package-inf
o.nvim/lua/package-info/virtual_text.lua:49: attempt to concatenate field 'version' (a nil value)
stack traceback:
...lazy/package-info.nvim/lua/package-info/virtual_text.lua:49: in function '__display_on_line'
...lazy/package-info.nvim/lua/package-info/virtual_text.lua:82: in function 'display'
...zy/package-info.nvim/lua/package-info/helpers/reload.lua:29: in function 'reload'
...lazy/package-info.nvim/lua/package-info/actions/show.lua:18: in function 'run'
...re/nvim/lazy/package-info.nvim/lua/package-info/init.lua:14: in function 'show'
[string ":lua"]:1: in main chunk
[C]: in function 'set_buf'
.../.local/share/nvim/lazy/ui/lua/nvchad/tabufline/init.lua:23: in function 'next'
/home/origami/.config/nvim/lua/mappings.lua:56: in function </home/origami/.config/nvim/lua/mappings.lua:55>
stack traceback:
[C]: in function 'set_buf'
.../.local/share/nvim/lazy/ui/lua/nvchad/tabufline/init.lua:23: in function 'next'
/home/origami/.config/nvim/lua/mappings.lua:56: in function </home/origami/.config/nvim/lua/mappings.lua:55>
This commit (https://github.com/RobertoNegro/package-info.nvim/commit/9b8a747d59b9cd5e8e689be6134ad170dfb7620a) fixes the issue for me
I have a similar issue, but the error is a different.
stack traceback:
...lazy/package-info.nvim/lua/package-info/utils/logger.lua:6: in function 'get_timeout'
...lazy/package-info.nvim/lua/package-info/utils/logger.lua:36: in function '__print'
...lazy/package-info.nvim/lua/package-info/utils/logger.lua:48: in function 'error'
...im/lazy/package-info.nvim/lua/package-info/utils/job.lua:19: in function 'on_error'
...im/lazy/package-info.nvim/lua/package-info/utils/job.lua:57: in function <...im/lazy/package-info.nvim/lua/package-info/utils/job.lua:41> function: builtin#18 ...lazy/package-info.nvim/lua/package-info/utils/logger.lua:6: attempt to index field 'config' (a nil value)
``
I get the same error as in the previous comment. I'm using LazyVim and I followed suggestions in #141 linked discussion.