Maxattax97 / coc-ccls

CCLS (C/C++) extension for coc.nvim
https://github.com/neoclide/coc.nvim
25 stars 3 forks source link

uncaughtException Error: spawn ccls ENOENT #3

Open javier-garcia-meteologica opened 4 years ago

javier-garcia-meteologica commented 4 years ago

Observed behavior

// CocOpenLog in debug mode
// console.log() in coc-ccls->lib/serverContext.js->initClient->cp.spawn
2020-04-15T09:47:14.960 DEBUG (pid:738550) [extension-coc-ccls] - ["ccls",[],{"cwd":"file:///home/user/.vim/plugged/coc.nvim","env":{"PATH":"/usr/share/Modules/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin"}}]
2020-04-15T09:47:14.964 ERROR (pid:738550) [server] - uncaughtException Error: spawn ccls ENOENT    
    at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)    
    at onErrorNT (internal/child_process.js:415:16)    
    at process._tickCallback (internal/process/next_tick.js:63:19)

Even if I hardcode this, (note that PATH contains only one directory):

const child = cp.spawn('/usr/bin/ccls', args, { env: { PATH: '/usr/bin' } });

I get another bug:

2020-04-15T10:22:16.521 ERROR (pid:741649) [extensions] - Error: Language client is not ready yet    
    at LanguageClient.onNotification (/home/javier/.vim/plugged/coc.nvim/build/index.js:56763:19)    
    at new InactiveRegionsProvider (/home/javier/.config/coc/extensions/node_modules/coc-ccls/lib/inactiveRegions.js:25:21)    
    at ServerContext.<anonymous> (/home/javier/.config/coc/extensions/node_modules/coc-ccls/lib/serverContext.js:203:31)    
    at Generator.throw (<anonymous>)    
    at rejected (/home/javier/.config/coc/extensions/node_modules/coc-ccls/lib/serverContext.js:5:65)

Expected behavior

Not to throw any error

Steps to reproduce

Run nvim and activate coc-ccls extension

System information

$ which ccls
/usr/bin/ccls
atoder commented 3 years ago

I have the same error