Mason Failed to Install Language Server in Neovim

Workaround available Windows, macOS, Linux Updated October 21, 2026

Quick answer

mason.nvim downloads servers using external tools (npm, pip, cargo, go, curl, unzip). If one is missing or misconfigured, installs fail. Check :checkhealth mason and :MasonLog for the missing tool.

Most likely fix: Read the real error.

Symptoms

Red 'failed' status in :Mason, or servers like pyright, tsserver or bashls never installing.

Why it happens

  • Node/npm not installed or not on the PATH Neovim sees
  • Missing runtime (cargo, go, python venv, unzip)
  • npm pointing to a private/work registry
  • Partial system update leaving broken runtimes

How to fix it

Try these in order — the most common fix is first.

  1. 1. Read the real error

    1. Run :MasonLog and find the failing command
    2. Run :checkhealth mason and fix every 'not executable' warning
  2. 2. Install the missing runtime

    1. Install Node via nvm/fnm or your package manager for npm-based servers
    2. Install cargo/go/python3-venv/unzip as the log requires
    3. Restart Neovim so PATH is refreshed, then retry in :Mason with i
  3. 3. Check npm registry

    1. Run npm config get registry
    2. If it points to a private registry, reset it or set Mason's npm install_args
  4. 4. Install the server manually

    1. Install it yourself (e.g. npm i -g pyright)
    2. Enable it with vim.lsp.enable('pyright') — Mason isn't required

This guide also covers

  • mason failed to install
  • mason nvim npm not found
  • mason lsp install error

Still not working?

If Neovim keeps failing, you're not alone. See every Neovim problem users report or the alternatives people switch to.

Other Neovim errors