coc-ccls
coc-ccls copied to clipboard
Unable to load global extension
Observed behavio
Every time I open neovim do I get greeted by the following message:
[coc.nvim] Unable to load global extension at /home/daniel/.config/coc/extensions/node_modules/coc-ccls: main
file ./lib/extension.js not found, you may need to build the project.
Steps to reproduce
I installed coc-ccls with CocInstall <package name>
, edited my config
{
"coc.preferences.formatOnSaveFiletypes": ["js", "jsx"],
"eslint.run": "onType",
"eslint.autoFix": true,
"languageserver": {
"ccls": {
"command": "ccls",
"filetypes": ["c", "cpp", "objc", "objcpp"],
"rootPatterns": [".ccls", "compile_commands.json", ".vim/", ".git/", ".hg/"],
"initializationOptions": {
"cache": {
"directory": "/tmp/ccls"
}
}
}
},
"java.home": "/usr/lib/jvm/java-11-openjdk/",
"java.format.settings.url": "/home/daniel/.config/coc/extensions/node_modules/redhat.java/eclipse-formatter.xml"
}
I've tried to update, rebuild, reinstall the plugin without any luck.
If you want to remove that warning altogether, you could delete the coc/
folder in ~/.config
and you can reinstall the plugins.
You could actually go in and delete the specific files or text to make it go away but I have a script in place to download a set of default extensions from Coc on Startup.
uninstalling coc-ccls and removing coc-ccls directory does not help
I am having the same issue, and reinstalling the extension does not seem to work for me either. I do not know what the file lib/extension.js could be, as it is not present in the extension.
I'm also running into this problem.
cd ~/.config/coc/extensions/node_modules/coc-ccls ln -s node_modules/ws/lib lib
Does this work for you ?
I am currently not with my Linux laptop so I am sorry that I can't test it now.
It fixed the issue for me at least.
For me - the problem here was that the extensions.json file referenced extensions I had long uninstalled. Removing the references to the extensions I no longer had installed in extensions.json fixed it for me.
cd ~/.config/coc/extensions/node_modules/coc-ccls ln -s node_modules/ws/lib lib
Does this work for you ?
i think your way is the best way
cd ~/.config/coc/extensions/node_modules/coc-ccls ln -s node_modules/ws/lib lib
Does this work for you ?
it does work for me with this issues
cd ~/.config/coc/extensions/node_modules/coc-ccls ln -s node_modules/ws/lib lib
Does this work for you ?
This worked for me as well. Thanks!
cd ~/.config/coc/extensions/node_modules/coc-ccls ln -s node_modules/ws/lib lib
Does this work for you ?
Yes, but can we talk about this? Can we not have to do this, yanno, new $machine and not remembering?
What's the actual reason for needing to do this?
Ah, from: https://github.com/neoclide/coc.nvim/issues/2088#issuecomment-974727778
cd ~/.config/coc/extensions/node_modules/coc-ccls
npm i
npm run build
After building you'll have this lib
. Cool.
Though, would be rad if :CocInstall coc-ccls
performed these same steps.