sourcegraph / sg.nvim

Experimental Sourcegraph + Cody plugin for Neovim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invalid node configuration: "unable to determine node version: {}"

gmmoose20 opened this issue · comments

nvim -v: v0.9.4

==============================================================================
sg: require("sg.health").check()

sg.nvim report ~
- Machine: x86_64, sysname: Windows_NT
- OK Valid nvim version: table: 0x01361b2783d8
- WARNING Unable to find valid cargo executable. Trying to build sg.nvim locally will fail. Instead use `:SourcegraphDownloadBinaries`
- OK Found `sg-nvim-agent`: "C:/Users/me/AppData/Local/nvim-data/lazy/sg.nvim/dist/sg-nvim-agent.exe"
- ERROR Invalid node executable: "unable to determine node version: {}"
- OK   Authentication setup correctly
- OK     endpoint set to: https://sourcegraph.com
- OK Found correct binary versions: "1.0.5" = "1.0.5"
- OK   Sourcegraph Connection info: {
  access_token_set = true,
  endpoint = "https://sourcegraph.com",
  sg_nvim_version = "1.0.5",
  sourcegraph_version = {
  build = "254873_2023-12-14_5.2-0048b9caec0a",
  product = "254873_2023-12-14_5.2-0048b9caec0a"
  }
  }

Do you have node installed? What happens when you run node --version?

Yes I do have node installed..
when I run node --version
it returns v21.5.0

Can you run checkhealth with latest sg.nvim plugin? I added a bit more information to help debug this.

sg: require("sg.health" ) . check( )

sg.nvim report
- Machine: x86_64, sysname: Windows_NT
- OK Valid nvim version: table: 0x0129c2cc0e30
- WARNING Unable to find valid cargo executable. Trying to build sg.nvim locally will fail. Instead use :SourcegraphDownloadBinaries
- OK Found sg-nvim-agent: "C:/Users/me/AppData/Local/nvim-data/lazy/sg.nvim/dist/sg-nvim-agent.exe"
- ERROR Invalid node executable (node): "unable to determine node version: {}"
OK Authentication setup correctly
OK
- OK Found correct binary versions: "1.0.5" = "1.0.5"
- OK Sourcegraph Connection info: {
access_token_set = true,
endpoint = "https://sourcegraph.com",
sg_nvim_version = "1.0.5".
sourcegraph_version = {
build = "256818_2024-01-06_5.2-9a4f52cd421d"
product = "256818_2024-01-06_5.2-9a4f52cd421d"

}
- To manage your Cody Account, navigate to: https://sourcegraph.com/cody/manage
- OK Cody Account Information: {
chat_limit = 20,
chat_usage = 7,
code_limit = 500,
code_usage = 47,
cody_pro_enabled = false,
username = "gmmoose20"

ERROR sg.nvim has issues that need to be resolved

endpoint set to: https://sourcegraph.com

here.. I don't really know why it doesn't read my node.

Huh, that's super weird. I wonder if there is something with you path? Do you have Mason installed or something that might be interfering?

Another thing to check would be, can you run:

:lua =vim.fn.systemlist('node --version')

and see what it prints? Or maybe even:

!node --version

?

That'd be super helpful

good day!! I've fixed it..
thank you for !node --version I realized that I didn't set up my powershell correctly, it's working fine now sg.nvim can finally detect the node. thank you for helping me debug 🤙

No problem :) thanks for your patience!