Introduction
coc.nvim depends on a working Node.js runtime, a clean extension state, and a Vim or Neovim setup that does not conflict with other completion or LSP plugins. When one of those pieces drifts, completion disappears, diagnostics stop updating, or Coc commands fail silently.
Symptoms
:CocInforeports errors or does not open correctly- Completion, diagnostics, or code actions stop appearing
- Coc extensions fail after a Node.js or plugin manager update
- Vim starts, but Coc never becomes active for supported filetypes
Common Causes
- Node.js is missing or too old for the installed Coc version
- Coc extensions were not installed or became corrupted
- Another completion or LSP plugin is competing for the same mappings
- The runtime path or plugin load order prevents Coc from initializing
Step-by-Step Fix
- 1.Check the Coc runtime and Node.js
- 2.Run
:CocInfoand confirmnode --versionfrom the same shell environment Vim uses.
:CocInfo
:echo exepath('node')- 1.Verify Coc extensions and health
- 2.Open
:CocList extensionsand confirm the language-specific extension you expect is installed and enabled.
:CocList extensions
:checkhealth- 1.Disable competing completion plugins temporarily
- 2.If multiple completion or LSP clients are active, reduce the config to Coc only and retest.
- 3.Clear Coc state and reinstall extensions
- 4.Remove stale Coc extension caches, restart Vim, and reinstall the required Coc extensions.
rm -rf ~/.config/coc/extensions:CocInstall coc-tsserver coc-jsonPrevention
- Keep Node.js and Coc on versions known to work together
- Avoid mixing multiple completion engines unless the boundaries are explicit
- Test
:CocInfoafter plugin or runtime upgrades - Keep Coc extension lists versioned in dotfiles or project docs