Coc.nvim: Coc does not install extension if file with same name exists

Created on 31 May 2020  路  6Comments  路  Source: neoclide/coc.nvim

Result from CocInfo

## versions

vim version: NVIM v0.4.3
node version: v12.13.0
coc.nvim version: 0.0.78-95e7ca8324
coc.nivm directory: /users/jrwrigh/.local/share/nvim/plugged/coc.nvim
term: screen-256color
platform: linux

## Output channel: snippets

[Info 9:07:06 AM] Using ultisnips directories: UltiSnips /users/jrwrigh/.config/coc/ultisnips
[Info 9:07:06 AM] Using ultisnips python command: pyx

## Output channel: highlight

[Info  - 9:07:06 AM] Highlight server running in node v12.13.0

Describe the bug

I'm not sure how exactly it happened, but I was running neovim v4.2.0 and got messages from Coc to upgrade. When I did the upgrade, I got the following errors:

[coc.nvim] Unable to load global extension at ~/.config/coc/extensions/node_modules/coc-python: package.json not found                                                                                 
[coc.nvim] Error on load extension from "~/.config/coc/extensions/node_modules/coc-python": ENOTDIR: not a directory, open '~/.config/coc/extensions/node_modules/coc-python/package.json'

Attempts to run CocInstall coc-python or CocUpdate did not work. It turns out the coc-python directory in the ~/.config/coc/extensions/node_modules/coc-python was replaced with an empty file called coc-python. No idea how that happened, but it did.

To fix the issue, simply delete the empty file. I'm however writing the issue to let someone know (maybe you have an idea of how this could've happened)?

Reproduce the bug

To reproduce the error messages, replace the coc-python directory with an empty file.

To trigger whatever process caused the coc-python directory to turn into an empty file, I have no idea.

Most helpful comment

I have the similar issue as @jrwrigh when running :CocInstall coc-marketplace
In my case, removing the blank file ~/.config/coc/extensions/node_modules/coc-marketplace doesn't fix the issue. It create the blank file coc-marketplace everytime when I run:CocInstall coc-marketplace.
@chemzqm when will coc.nvim create a blank file when running CocInstall?
Thanks

Here is my cocinfo
image

All 6 comments

It's expected

I have the similar issue as @jrwrigh when running :CocInstall coc-marketplace
In my case, removing the blank file ~/.config/coc/extensions/node_modules/coc-marketplace doesn't fix the issue. It create the blank file coc-marketplace everytime when I run:CocInstall coc-marketplace.
@chemzqm when will coc.nvim create a blank file when running CocInstall?
Thanks

Here is my cocinfo
image

@you-n-g I have the same issue on both coc-python and coc-sh. It worked for my mac and linxu box, but it fails on AWS instance.

I have the same issue when trying to install coc-json and coc-clangd. It just create an empty file with the extension name.
Removing the blank file also does NOT help :(
@chemzqm any idea?

Another workaroud is upated here

Was this page helpful?
0 / 5 - 0 ratings

Related issues

FrankLA0203 picture FrankLA0203  路  3Comments

iago-lito picture iago-lito  路  3Comments

skylite21 picture skylite21  路  3Comments

cvlmtg picture cvlmtg  路  3Comments

MacGuffinLife picture MacGuffinLife  路  4Comments