Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to load global extension #5

Open
Notaduck opened this issue Sep 16, 2020 · 12 comments
Open

Unable to load global extension #5

Notaduck opened this issue Sep 16, 2020 · 12 comments

Comments

@Notaduck
Copy link

Notaduck commented Sep 16, 2020

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.

@ferran9908
Copy link

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.

@CapSel
Copy link

CapSel commented Nov 26, 2020

uninstalling coc-ccls and removing coc-ccls directory does not help

@tarsiec
Copy link

tarsiec commented Dec 26, 2020

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.

@Tkdefender88
Copy link

I'm also running into this problem.

@DannMartinnez
Copy link

cd ~/.config/coc/extensions/node_modules/coc-ccls
ln -s node_modules/ws/lib lib

Does this work for you ?

@Notaduck
Copy link
Author

I am currently not with my Linux laptop so I am sorry that I can't test it now.

@davepinto
Copy link

It fixed the issue for me at least.

@DarrienG
Copy link

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.

@yegetables
Copy link

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

@zzSunil
Copy link

zzSunil commented Aug 10, 2021

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

@b3ll9trix
Copy link

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!

@shmup
Copy link

shmup commented Jul 21, 2022

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: neoclide/coc.nvim#2088 (comment)

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests