josa42 / coc-sh

SH language server extension using bash-language-server for coc.nvim.
MIT License
209 stars 4 forks source link

bash-language-server isn't downloaded, coc/sh/* folder stays empty #24

Closed Trollwut closed 5 years ago

Trollwut commented 5 years ago

Hey folks!

First, thanks for creating this package!

I have my neovim config running on 2 Manjaro machines and 1 Arch machine. While my Manjaro ones work as intended with this extension, my Arch one doesn't.

I use a pretty simple config for coc in my neovim init:

Plug 'neoclide/coc.nvim', {'branch': 'release'}
" add languages to this array to automatically load and update language
" support
let g:coc_global_extensions = [
      \ 'coc-css',
      \ 'coc-github',
      \ 'coc-highlight',
      \ 'coc-html',
      \ 'coc-java',
      \ 'coc-json',
      \ 'coc-lists',
      \ 'coc-python',
      \ 'coc-rls',
      \ 'coc-sh',
      \ 'coc-snippets',
      \ 'coc-syntax',
      \ 'coc-vimlsp',
      \ 'coc-yaml',
      \ 'coc-yank',
      \ ]

Now when I open a bash file on my Arch machine, it will try to begin the installation of coc-sh. Unfortunatelly, it will lead to this error log:

screenshot

And this will lead to the following vim error message:

[coc.nvim] Server bash-language-server failed to start: Command "/home/cedric/.config/coc/sh/tools/node_modules/.bin/bash-language-server" of sh is not executable: Error: not found: /home/cedric/.config/coc/sh/tools/node_modules/.bin/bash-language-server

Is this a known problem?

If you need any further information, please ask!

$ node -v
v11.15.0
$ yarn -v
1.16.0
$ npm -v
6.10.0
Witos commented 5 years ago

I've got the same problem. Creating the directory manually doesn't help.

Trollwut commented 5 years ago

You're also running Arch? Maybe it's some kind of yarnrc config stuff…?

I also wonder why the pictured error says it tries to open /home/username/package.json. Shouldn't it be some file in coc-sh config folder and not in home?

Witos commented 5 years ago

No, Gentoo. It's probably a matter of nodejs or some nodejs module version.

Trollwut commented 5 years ago

That might be. But I'm not used to nodejs, so I don't know for what I'm looking for.

As I have one machine with this problem and another that works, I can check differences, if someone tells me what to check. :)

Witos commented 5 years ago

Just tried in Arch at work - using node.js v11.15.0 - everything works fine....

josa42 commented 5 years ago

bash-language-server does not install on node 12.x.

Reference:

Trollwut commented 5 years ago

Still doesn't do it for me. Being on Arch, I switched to v11.15.0 and v11.14.0 and still receive the same error.

$ node -v
v11.14.0
$ npm -v
6.10.2

Did I miss something?

josa42 commented 5 years ago

This should be resolved in v0.3.1.