neoclide / coc.nvim

Nodejs extension host for vim & neovim, load extensions like VSCode and host language servers.
Other
24.47k stars 960 forks source link

[coc.vim] server clangd failed to start: Error: spawn UNKNOWN #4684

Closed manueldgr closed 1 year ago

manueldgr commented 1 year ago

I am currently facing this error message and I can't find any information anywhere: [coc.vim] server clangd failed to start: Error: spawn UNKNOWN

Logs Error logs

[Error - 00:52:34.308] clangd client: couldn't create connection to server. Error: spawn UNKNOWN at ChildProcess.spawn (node:internal/child_process:420:11) at Object.spawn (node:child_process:757:9) at C:\Users\manux\AppData\Local\nvim-data\plugged\coc.nvim\build\index.js:248:6330 at async Nd.createConnection (C:\Users\manux\AppData\Local\nvim-data\plugged\coc.nvim\build\index.js:244:15252) at async Nd._start (C:\Users\manux\AppData\Local\nvim-data\plugged\coc.nvim\build\index.js:244:7748) at async Object.start (C:\Users\manux\AppData\Local\nvim-data\plugged\coc.nvim\build\index.js:249:5338) System information Clangd version (from the log, or clangd --version):

clangd version 16.0.2 (https://github.com/llvm/llvm-project 18ddebe1a1a9bde349441631365f0472e9693520) Features: windows+grpc Platform: x86_64-pc-windows-msvc clangd extension version (from :CocInfo):

versions

vim version: NVIM v0.9.1 node version: v20.3.1 coc.nvim version: 0.0.82-b7375d5f 2023-01-30 05:09:03 +0800 coc.nvim directory: C:\Users\manux\AppData\Local\nvim-data\plugged\coc.nvim term: undefined platform: win32

Log of coc.nvim

2023-06-25T00:58:01.012 INFO (pid:10484) [plugin] - coc.nvim initialized with node: v20.3.1 after 399 2023-06-25T00:58:01.031 INFO (pid:10484) [services] - LanguageClient clangd state change: stopped => starting 2023-06-25T00:58:01.038 INFO (pid:10484) [services] - LanguageClient clangd state change: starting => stopped 2023-06-25T00:58:01.040 ERROR (pid:10484) [services] - Server clangd failed to start: Error: spawn UNKNOWN at ChildProcess.spawn (node:internal/child_process:420:11) at Object.spawn (node:child_process:757:9) at C:\Users\manux\AppData\Local\nvim-data\plugged\coc.nvim\build\index.js:248:6330 at async Nd.createConnection (C:\Users\manux\AppData\Local\nvim-data\plugged\coc.nvim\build\index.js:244:15252) at async Nd._start (C:\Users\manux\AppData\Local\nvim-data\plugged\coc.nvim\build\index.js:244:7748) at async Object.start (C:\Users\manux\AppData\Local\nvim-data\plugged\coc.nvim\build\index.js:249:5338) { errno: -4094, code: 'UNKNOWN', syscall: 'spawn' } 2023-06-25T00:58:06.686 INFO (pid:10484) [attach] - receive notification: showInfo [] Operating system: windows

I would be very grateful if someone could help me.

fannheyward commented 1 year ago

Error: spawn UNKNOWN

coc.nvim failed to spawn clangd process.

manueldgr commented 1 year ago

Is there any way to fix this error?

fannheyward commented 1 year ago

Try set clangd.path to the full path of your clangd.

erfan4323 commented 1 year ago

I have the same issue Is there anything to solve it?

manueldgr commented 1 year ago

I have the same issue Is there anything to solve it?

If you find any solution, please let me know.

fannheyward commented 1 year ago

https://github.com/clangd/coc-clangd/issues/595#issuecomment-1626947187

Looks like node-clangd downloads the wrong clangd binary for your OS, working on this.