elixir-lsp / coc-elixir

Elixir language server extension based on elixir-ls for coc.nvim
MIT License
168 stars 11 forks source link

Extension fails to load with "missing main file" #18

Open rsimmonsjr opened 4 years ago

rsimmonsjr commented 4 years ago

I am a new coc user and I tried to install the elixir plugin and got this error.

`[coc.nvim] extension "coc-elixir" doesn't contain main file /home/rsimmonsjr/.vim/plugged/coc-elixir/lib/index.js.1

amiralies commented 4 years ago

I think this happens when using vim plug installation method without post-install hook, try this:

Plug 'amiralies/coc-elixir', {'do': 'yarn install --frozen-lockfile && yarn run build'}
rsimmonsjr commented 4 years ago

Not the problem. Here are the relevant lines:

Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'amiralies/coc-elixir', {'do': 'yarn install --frozen-lockfile && yarn run build'}
amiralies commented 4 years ago

Don't know if it's relevent to your problem or not (since you're facing missing main file error), but I just realized installation instructions for vim plug is wrong (I'm going to update). Anyway, can you cd to where coc-vim is cloned inside your ~/.vim and run yarn prepack and see if it works?

kpruehss commented 4 years ago

I am running into a similar issue. I've installed the extension via CocInstall coc-elixir. Was working great until this morning when Coc updated the extension. Now its not loading (not seeing any error messages though)

EDIT: Completely removing the extension and reinstalling does seem to fix it thanks, @collegeimprovements

collegeimprovements commented 4 years ago

Same thing happens for me. It doesn't format the code automatically on save now. Edit: Uninstalling and reinstalling fixes the issue.