1

so my issue is I installed neovim and nodejs and coc.nvim in windows I want to set it up for c++ and I did everything it asked but when I open cpp files I got an error message like : Server clangd failed to start: Error: spawn UNKNOWN here is the :CocInfo

## versions

vim version: NVIM v0.9.1
node version: v18.16.1
coc.nvim version: 0.0.82-'2280f9a 2023-06-26 10:37:36 +0800'
coc.nvim directory: C:\Users\EXO\AppData\Local\nvim-data\plugged\coc.nvim
term: undefined
platform: win32

## Log of coc.nvim

2023-07-07T13:09:16.419 INFO (pid:28784) [plugin] - coc.nvim initialized with node: v18.16.1 after 164
2023-07-07T13:09:22.565 INFO (pid:28784) [services] - LanguageClient clangd state change: stopped => starting
2023-07-07T13:09:22.568 INFO (pid:28784) [services] - LanguageClient clangd state change: starting => stopped
2023-07-07T13:09:22.569 ERROR (pid:28784) [services] - Server clangd failed to start: Error: spawn UNKNOWN
    at ChildProcess.spawn (node:internal/child_process:413:11)
    at Object.spawn (node:child_process:757:9)
    at C:\Users\EXO\AppData\Local\nvim-data\plugged\coc.nvim\build\index.js:69379:47
    at async LanguageClient.createConnection (C:\Users\EXO\AppData\Local\nvim-data\plugged\coc.nvim\build\index.js:68714:28)
    at async LanguageClient._start (C:\Users\EXO\AppData\Local\nvim-data\plugged\coc.nvim\build\index.js:68340:30)
    at async Object.start (C:\Users\EXO\AppData\Local\nvim-data\plugged\coc.nvim\build\index.js:69889:17) {
  errno: -4094,
  code: 'UNKNOWN',
  syscall: 'spawn'
}
2023-07-07T13:09:34.026 INFO (pid:28784) [attach] - receive notification: showInfo []

CocConfig data about clangd.path

CocInfo issue

is anyone had the same issue? there was nothing to find and solve the issue

I tried ccls but it showed the same error message and clangd.path shows the same error

1 Answers1

0

The clangd binary downloaded by coc-clangd is broken, caused by unzipper with node v18.16.1, solutions:

  1. upgrade your node to v20, delete the broken clangd binary, run :CocCommand clangd.install
  2. or download clangd from GitHub release, and set clangd.path to it.
fannheyward
  • 18,599
  • 12
  • 71
  • 109