Closed Gankarloo closed 2 years ago
If I define sh.commandPath in coc-settings.json the language server starts correctly.
"sh.commandPath": "C:/Users/ankarloog/AppData/Local/coc/extensions/node_modules/coc-sh/node_modules/.bin/bash-language-server.cmd"
I was getting a similar spawn UNKNOWN error, on cygwin. And this other one:
[coc.nvim] Server sh failed to start: Launching server "sh" using command
C:/Users/owuser/AppData/Roaming/npm/bash-language-server failed.
[coc.nvim] Server languageserver.bash failed to start: Launching server
"languageserver.bash" using command bash-language-server failed.
Then I looked at the source and realized I should have had:
"sh.commandPath": "C:/Users/owuser/AppData/Roaming/npm"
And now it appears to be working.
I misspoke (I made a mistake) in the previous comment. ale was providing error messages, not coc.nvim, I think.
The coc-json, coc-yaml coc.nvim extensions are working. This is cygwin on Windows 7.
Here is the output of CocInfo
I didn't seem to attach the file to the previous comment. Here it is copy-and-pasted:
vim version: VIM - Vi IMproved 8.2 8020486 node version: v12.19.1 coc.nvim version: 0.0.79-1e1f452a03 coc.nvim directory: c:\cygwin64\home\owuser.vim\pack\git-plugins\start\coc.nvim term: mintty platform: win32
2020-11-19T12:07:22.168 INFO (pid:4720) [services] - registered service "languageserver.json"^M
2020-11-19T12:07:22.169 INFO (pid:4720) [services] - registered service "languageserver.yaml"^M
2020-11-19T12:07:22.172 INFO (pid:4720) [plugin] - coc.nvim 0.0.79-1e1f452a03 initialized with node: v12.19.1 after 112ms^M
2020-11-19T12:07:36.396 INFO (pid:4720) [model-installer] - Using npm from: C:\Program Files\nodejs\npm.CMD^M
2020-11-19T12:07:36.399 INFO (pid:4720) [model-installer] - Get info from https://registry.npmjs.org/^M
2020-11-19T12:07:36.516 INFO (pid:4720) [model-installer] - Fetched info of coc-sh {
'dist.tarball': 'https://registry.npmjs.org/coc-sh/-/coc-sh-0.6.0.tgz',
'engines.coc': '^0.0.73',
version: '0.6.0',
name: 'coc-sh'
}^M
2020-11-19T12:07:36.517 INFO (pid:4720) [model-installer] - Downloading from https://registry.npmjs.org/coc-sh/-/coc-sh-0.6.0.tgz^M
2020-11-19T12:07:36.568 INFO (pid:4720) [model-installer] - Download progress 17.5%^M
2020-11-19T12:07:36.573 INFO (pid:4720) [model-installer] - Download progress 53.7%^M
2020-11-19T12:07:36.579 INFO (pid:4720) [model-installer] - Download progress 89.9%^M
2020-11-19T12:07:36.583 INFO (pid:4720) [model-installer] - Download progress 100.0%^M
2020-11-19T12:07:36.584 INFO (pid:4720) [model-download] - Download completed: https://registry.npmjs.org/coc-sh/-/coc-sh-0.6.0.tgz^M
2020-11-19T12:07:36.585 INFO (pid:4720) [model-download] - Downloaded https://registry.npmjs.org/coc-sh/-/coc-sh-0.6.0.tgz => C:\cygwin64\tmp\coc-sh-MSDKZR^M
2020-11-19T12:07:36.686 INFO (pid:4720) [model-installer] - Extension download at C:\cygwin64\tmp\coc-sh-MSDKZR^M
2020-11-19T12:07:36.687 INFO (pid:4720) [model-installer] - Installing dependencies by: C:\Program Files\nodejs\npm.CMD install --ignore-scripts --no-lockfile --production.^M
2020-11-19T12:07:50.485 INFO (pid:4720) [model-installer] - [npm] added 123 packages from 221 contributors and audited 379 packages in 12.957s^M
2020-11-19T12:07:50.611 INFO (pid:4720) [model-installer] - [npm] ^M
2020-11-19T12:07:50.611 INFO (pid:4720) [model-installer] - [npm] 4 packages are looking for funding^M
2020-11-19T12:07:50.611 INFO (pid:4720) [model-installer] - [npm] run npm fund
for details^M
2020-11-19T12:07:50.611 INFO (pid:4720) [model-installer] - [npm] ^M
2020-11-19T12:07:50.611 INFO (pid:4720) [model-installer] - [npm] found 0 vulnerabilities^M
2020-11-19T12:07:50.611 INFO (pid:4720) [model-installer] - [npm] ^M
2020-11-19T12:07:50.670 INFO (pid:4720) [model-installer] - Update package.json at C:\home\owuser.config\coc\extensions\package.json^M
2020-11-19T12:07:50.670 INFO (pid:4720) [model-installer] - Installed extension coc-sh@0.6.0 at \home\owuser.config\coc\extensions\node_modules\coc-sh^M
2020-11-19T12:07:50.687 INFO (pid:4720) [services] - registered service "sh"^M
2020-11-19T12:07:50.688 INFO (pid:4720) [services] - bash-language-server state change: stopped => starting^M
2020-11-19T12:07:50.691 INFO (pid:4720) [services] - bash-language-server state change: starting => stopped^M
2020-11-19T12:07:50.693 ERROR (pid:4720) [services] - Server sh failed to start: Launching server "sh" using command C:/Users/owuser/AppData/Roaming/npm failed.^M
2020-11-19T12:07:50.694 ERROR (pid:4720) [language-client-index] - Error: spawn C:/Users/owuser/AppData/Roaming/npm ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn C:/Users/owuser/AppData/Roaming/npm',
path: 'C:/Users/owuser/AppData/Roaming/npm',
spawnargs: [ 'start' ]
}^M
2020-11-19T12:07:22.168 INFO (pid:4720) [services] - registered service "languageserver.json"^M
2020-11-19T12:07:22.169 INFO (pid:4720) [services] - registered service "languageserver.yaml"^M
2020-11-19T12:07:22.172 INFO (pid:4720) [plugin] - coc.nvim 0.0.79-1e1f452a03 initialized with node: v12.19.1 after 112ms^M
2020-11-19T12:07:36.396 INFO (pid:4720) [model-installer] - Using npm from: C:\Program Files\nodejs\npm.CMD^M
2020-11-19T12:07:36.399 INFO (pid:4720) [model-installer] - Get info from https://registry.npmjs.org/^M
2020-11-19T12:07:36.516 INFO (pid:4720) [model-installer] - Fetched info of coc-sh {
'dist.tarball': 'https://registry.npmjs.org/coc-sh/-/coc-sh-0.6.0.tgz',
'engines.coc': '^0.0.73',
version: '0.6.0',
name: 'coc-sh'
}^M
2020-11-19T12:07:36.517 INFO (pid:4720) [model-installer] - Downloading from https://registry.npmjs.org/coc-sh/-/coc-sh-0.6.0.tgz^M
2020-11-19T12:07:36.568 INFO (pid:4720) [model-installer] - Download progress 17.5%^M
2020-11-19T12:07:36.573 INFO (pid:4720) [model-installer] - Download progress 53.7%^M
2020-11-19T12:07:36.579 INFO (pid:4720) [model-installer] - Download progress 89.9%^M
2020-11-19T12:07:36.583 INFO (pid:4720) [model-installer] - Download progress 100.0%^M
2020-11-19T12:07:36.584 INFO (pid:4720) [model-download] - Download completed: https://registry.npmjs.org/coc-sh/-/coc-sh-0.6.0.tgz^M
2020-11-19T12:07:36.585 INFO (pid:4720) [model-download] - Downloaded https://registry.npmjs.org/coc-sh/-/coc-sh-0.6.0.tgz => C:\cygwin64\tmp\coc-sh-MSDKZR^M
2020-11-19T12:07:36.686 INFO (pid:4720) [model-installer] - Extension download at C:\cygwin64\tmp\coc-sh-MSDKZR^M
2020-11-19T12:07:36.687 INFO (pid:4720) [model-installer] - Installing dependencies by: C:\Program Files\nodejs\npm.CMD install --ignore-scripts --no-lockfile --production.^M
2020-11-19T12:07:50.485 INFO (pid:4720) [model-installer] - [npm] added 123 packages from 221 contributors and audited 379 packages in 12.957s^M
2020-11-19T12:07:50.611 INFO (pid:4720) [model-installer] - [npm] ^M
2020-11-19T12:07:50.611 INFO (pid:4720) [model-installer] - [npm] 4 packages are looking for funding^M
2020-11-19T12:07:50.611 INFO (pid:4720) [model-installer] - [npm] run npm fund
for details^M
2020-11-19T12:07:50.611 INFO (pid:4720) [model-installer] - [npm] ^M
2020-11-19T12:07:50.611 INFO (pid:4720) [model-installer] - [npm] found 0 vulnerabilities^M
2020-11-19T12:07:50.611 INFO (pid:4720) [model-installer] - [npm] ^M
2020-11-19T12:07:50.670 INFO (pid:4720) [model-installer] - Update package.json at C:\home\owuser.config\coc\extensions\package.json^M
2020-11-19T12:07:50.670 INFO (pid:4720) [model-installer] - Installed extension coc-sh@0.6.0 at \home\owuser.config\coc\extensions\node_modules\coc-sh^M
2020-11-19T12:07:50.687 INFO (pid:4720) [services] - registered service "sh"^M
2020-11-19T12:07:50.688 INFO (pid:4720) [services] - bash-language-server state change: stopped => starting^M
2020-11-19T12:07:50.691 INFO (pid:4720) [services] - bash-language-server state change: starting => stopped^M
2020-11-19T12:07:50.693 ERROR (pid:4720) [services] - Server sh failed to start: Launching server "sh" using command C:/Users/owuser/AppData/Roaming/npm failed.^M
2020-11-19T12:07:50.694 ERROR (pid:4720) [language-client-index] - Error: spawn C:/Users/owuser/AppData/Roaming/npm ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn C:/Users/owuser/AppData/Roaming/npm',
path: 'C:/Users/owuser/AppData/Roaming/npm',
spawnargs: [ 'start' ]
CocInfo
versions
vim version: VIM - Vi IMproved 8.2 8021058 node version: v14.5.0 coc.nvim version: 0.0.78-e9ce9768e2 coc.nvim directory: C:\Users\ankarloog\vimfiles\pack\minpac\start\coc.nvim term: undefined platform: win32
Output channel: sh
[Error - 15:43:01] Starting client failed Error: spawn UNKNOWN at ChildProcess.spawn (internal/child_process.js:406:11) at Object.spawn (child_process.js:553:9) at C:\Users\ankarloog\vimfiles\pack\minpac\start\coc.nvim\build\index.js:57811:61
I'm on Windows10
bash-language-server works if I start it manually
PS C:\Users\ankarloog\AppData\Local\coc\extensions\node_modules\coc-sh\node_modules\.bin> .\bash-language-server.ps1 -v Version is 1.16.1
extension is installed with :CocInstall coc-sh