coc-elixir icon indicating copy to clipboard operation
coc-elixir copied to clipboard

Extension fails to load with "missing main file"

Open rsimmonsjr opened this issue 5 years ago • 5 comments

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

rsimmonsjr avatar May 16 '20 20:05 rsimmonsjr

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'}

amiralies avatar May 16 '20 20:05 amiralies

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'}

rsimmonsjr avatar May 17 '20 16:05 rsimmonsjr

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?

amiralies avatar May 17 '20 16:05 amiralies

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

kpruehss avatar May 18 '20 09:05 kpruehss

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

collegeimprovements avatar May 19 '20 06:05 collegeimprovements