TabbyML / vim-tabby

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tabby keeps finding old version of node

xeTaiz opened this issue · comments

Hi there,

I was trying to get tabby running in NeoVim (v0.9.4) and I successfully installed the plugin using packer.
Now :Tabby keeps telling me that my node.js version is too old (6.6.8). The problem is I would not know where Tabby finds this node version, as the only version I have installed is v21.5.0.
I further tried pointing tabby directly to this /usr/bin/node binary with v21 using the configuration described in the README, but :Tabby keep insisting on finding only version 6.6.8. Re-installing the plugin does not change the behavior.

Any hints how to solve this or where to look for more detailed errors or logs?

Kind regards,
Dominik

Hi, @xeTaiz

Could you please share how you have set the node binary path?

I have tried to set up Neovim with Packer, and it seems that this config should work fine, I can select the node version by changing vim.g.tabby_node_binary .
My ~/.config/nvim/init.lua file:

vim.g.tabby_trigger_mode = 'auto'
vim.g.tabby_node_binary = '/home/icy/.nvm/versions/node/v18.18.2/bin/node'

return require('packer').startup(function(use)
  --- Tabby plugin
  use { 'TabbyML/vim-tabby' }
end)

Hi @icycodes
my config looks as follows:

vim.g.tabby_node_binary = '/usr/bin/node'
vim.g.tabby_trigger_mode = 'auto'

and that specific /usr/bin/node --version gives me v21.5.0

The packer installation part is a bit more crowded in my case but similar. PackerSync gladly installed it and I do have the :Tabby command afterall.

I have also tried setting the node path via :let g:tabby_node_binary = '/usr/bin/node' and :lua vim.g.tabby_node_binary = '/usr/bin/node' in the vim command line.
If I run :!which node in there it even prints me that /usr/bin/node is the one found in the PATH, yet something somehow seems to overwrite that.

Hi, @xeTaiz

Since I am unable to reproduce the problem you are facing, it seems there is little I can do. However, here are some tips to help you debug the issue in your environment:

  • The node version check and the execution of the tabby-agent script are called within the tabby#OnVimEnter function, which is bound to the VimEnter event. Please make sure that the global variables are set before this point in time.
  • You have the option to edit the script locally for further debugging. For example, you can edit the file located at ~/.local/share/nvim/site/pack/packer/start/vim-tabby/autoload/tabby.vim and add some echo commands to see which node path we can obtain at that point.

Hey there,

thank you for your response! I understand that my issue cannot be easily reproduced.. Thank you for your tips on debugging, this is really all I had hoped for :D
I will try to solve this myself then using your hints and thus close the issue.