nvim-lsp-installer
nvim-lsp-installer copied to clipboard
Server installation fails inside Docker container with mounted volume
For several days I've been trying to configure my LSP servers using this plugin, but have consistently been getting errors like Spawning language server with cmd:
lua-language-server failed. The language server is either not installed, missing from PATH, or not executable.
I've read up on issues like #305 and discussion https://github.com/williamboman/nvim-lsp-installer/discussions/392 and see that the plugin should be loading the proper PATH to execute each server in it's appropriate environment, but still no luck.
Finally I have rolled my config back to the absolute minimum to, then deleted my entire ~/.local/share/nvim
directory and reinstalled all packages and lsps from scratch with the latest version to isolate the issue:
local install_path = vim.fn.stdpath 'data' .. '/site/pack/packer/start/packer.nvim'
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
PACKER_BOOTSTRAP = vim.fn.system {
'git',
'clone',
'--depth',
'1',
'https://github.com/wbthomason/packer.nvim',
install_path,
}
print 'Installing packer close and reopen Neovim...'
vim.cmd [[packadd packer.nvim]]
end
-- Use a protected call so we don't error out on first use
local status_ok, packer = pcall(require, 'packer')
if not status_ok then
return
end
-- Have packer use a popup window
packer.init {
display = {
open_fn = function()
return require('packer.util').float { border = 'rounded' }
end,
},
}
-- Install your plugins here
packer.startup(function(use)
use 'wbthomason/packer.nvim'
-- LSP
use 'neovim/nvim-lspconfig'
use "williamboman/nvim-lsp-installer"
end)
local lsp_installer = require("nvim-lsp-installer")
lsp_installer.on_server_ready(function(server)
local opts = {}
server:setup(opts)
end)
Just now, I checked the path on disk where the server was being installed and found the executable was located at ~/.local/share/nvim/lsp_servers/sumneko_lua/sumneko_lua.tmp/extension/server/bin/lua-language-server
. Further, I used print(nvim.inspect(server))
in the on_server_ready
above to look into how the server is being configured on start up and see that the PATH for the cmd_env is being set to <my home>/.local/share/nvim/lsp_servers/sumneko_lua/extension/server/bin:...
, the key difference being .../lsp_servers/sumneko_lua/...
and .../lsp_servers/sumneko_lua/sumneko_lua.tmp/...
. This difference is consistent with ALL the LSP servers I have installed.
OS: Ubuntu 20.04 Neovim: 0.6.1
lsp-installer.log: (note: in spite of the home directory of "/Users/..." this is a an Ubuntu machine configured differently because of how it's running in Docker, but I'm seeing identical behavior on other bare-metal machines which are not configured this way, this just happened to be the log file I had access to at the moment.)
[DEBUG Tue 11 Jan 2022 04:27:21 PM UTC] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:710: Queuing server="sumneko_lua", version="" for installation
[INFO Tue 11 Jan 2022 04:27:21 PM UTC] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:664: Starting install server_name="sumneko_lua", requested_version=""
[DEBUG Tue 11 Jan 2022 04:27:21 PM UTC] ...r/start/nvim-lsp-installer/lua/nvim-lsp-installer/fs.lua:41: fs: mkdirp /Users/jeremy.satterfield/.local/share/nvim/lsp_servers/sumneko_lua.tmp
[DEBUG Tue 11 Jan 2022 04:27:21 PM UTC] ...nvim-lsp-installer/lua/nvim-lsp-installer/core/fetch.lua:26: Fetching URL "https://api.github.com/repos/sumneko/vscode-lua/releases"
[DEBUG Tue 11 Jan 2022 04:27:21 PM UTC] ...rt/nvim-lsp-installer/lua/nvim-lsp-installer/process.lua:117: Spawning cmd="gh", spawn_opts={
args = { "api", "repos/sumneko/vscode-lua/releases" }
}
[ERROR Tue 11 Jan 2022 04:27:21 PM UTC] ...rt/nvim-lsp-installer/lua/nvim-lsp-installer/process.lua:153: Failed to spawn process. cmd="gh", err="ENOENT: no such file or directory"
[DEBUG Tue 11 Jan 2022 04:27:21 PM UTC] ...nvim-lsp-installer/lua/nvim-lsp-installer/core/fetch.lua:79: Flushing stdout/stderr buffers.
[DEBUG Tue 11 Jan 2022 04:27:21 PM UTC] ...rt/nvim-lsp-installer/lua/nvim-lsp-installer/process.lua:293: Previous job failed, attempting next.
[DEBUG Tue 11 Jan 2022 04:27:21 PM UTC] ...rt/nvim-lsp-installer/lua/nvim-lsp-installer/process.lua:117: Spawning cmd="wget", spawn_opts={
args = { "--header", "User-Agent: nvim-lsp-installer (+https://github.com/williamboman/nvim-lsp-installer)", "-nv", "-O", "-", "https://api.github.com/repos/sumneko/vscode-lua/releases" }
}
[DEBUG Tue 11 Jan 2022 04:27:21 PM UTC] ...rt/nvim-lsp-installer/lua/nvim-lsp-installer/process.lua:163: Spawned with pid 83601
[DEBUG Tue 11 Jan 2022 04:27:21 PM UTC] ...nvim-lsp-installer/lua/nvim-lsp-installer/ui/display.lua:401: Opening window
[DEBUG Tue 11 Jan 2022 04:27:21 PM UTC] ...r/start/nvim-lsp-installer/lua/nvim-lsp-installer/fs.lua:106: fs: read_file "/Users/jeremy.satterfield/.local/share/nvim/lsp_servers/python/nvim-lsp-installer-receipt.json"
[DEBUG Tue 11 Jan 2022 04:27:21 PM UTC] ...rt/nvim-lsp-installer/lua/nvim-lsp-installer/process.lua:117: Spawning cmd="npm", spawn_opts={
args = { "outdated", "--json", "pyright" },
cwd = "/Users/jeremy.satterfield/.local/share/nvim/lsp_servers/python"
}
[DEBUG Tue 11 Jan 2022 04:27:21 PM UTC] ...rt/nvim-lsp-installer/lua/nvim-lsp-installer/process.lua:163: Spawned with pid 83602
[DEBUG Tue 11 Jan 2022 04:27:21 PM UTC] ...r/start/nvim-lsp-installer/lua/nvim-lsp-installer/fs.lua:106: fs: read_file "/Users/jeremy.satterfield/.local/share/nvim/lsp_servers/sumneko_lua/nvim-lsp-installer-receipt.json"
[DEBUG Tue 11 Jan 2022 04:27:21 PM UTC] ...nvim-lsp-installer/lua/nvim-lsp-installer/core/fetch.lua:26: Fetching URL "https://api.github.com/repos/sumneko/vscode-lua/releases"
[DEBUG Tue 11 Jan 2022 04:27:21 PM UTC] ...rt/nvim-lsp-installer/lua/nvim-lsp-installer/process.lua:117: Spawning cmd="gh", spawn_opts={
args = { "api", "repos/sumneko/vscode-lua/releases" }
}
[ERROR Tue 11 Jan 2022 04:27:21 PM UTC] ...rt/nvim-lsp-installer/lua/nvim-lsp-installer/process.lua:153: Failed to spawn process. cmd="gh", err="ENOENT: no such file or directory"
[DEBUG Tue 11 Jan 2022 04:27:21 PM UTC] ...nvim-lsp-installer/lua/nvim-lsp-installer/core/fetch.lua:79: Flushing stdout/stderr buffers.
[DEBUG Tue 11 Jan 2022 04:27:21 PM UTC] ...rt/nvim-lsp-installer/lua/nvim-lsp-installer/process.lua:293: Previous job failed, attempting next.
[DEBUG Tue 11 Jan 2022 04:27:21 PM UTC] ...rt/nvim-lsp-installer/lua/nvim-lsp-installer/process.lua:117: Spawning cmd="wget", spawn_opts={
args = { "--header", "User-Agent: nvim-lsp-installer (+https://github.com/williamboman/nvim-lsp-installer)", "-nv", "-O", "-", "https://api.github.com/repos/sumneko/vscode-lua/releases" }
}
[DEBUG Tue 11 Jan 2022 04:27:21 PM UTC] ...rt/nvim-lsp-installer/lua/nvim-lsp-installer/process.lua:163: Spawned with pid 83610
[DEBUG Tue 11 Jan 2022 04:27:22 PM UTC] ...rt/nvim-lsp-installer/lua/nvim-lsp-installer/process.lua:149: Job pid=83610 exited with exit_code=0, signal=0
[DEBUG Tue 11 Jan 2022 04:27:22 PM UTC] ...nvim-lsp-installer/lua/nvim-lsp-installer/core/fetch.lua:29: Successfully fetched URL "https://api.github.com/repos/sumneko/vscode-lua/releases"
[DEBUG Tue 11 Jan 2022 04:27:22 PM UTC] ...installer/lua/nvim-lsp-installer/core/clients/github.lua:56: Resolved latest version repo="sumneko/vscode-lua", tag_name="v2.5.6"
[DEBUG Tue 11 Jan 2022 04:27:22 PM UTC] ...rt/nvim-lsp-installer/lua/nvim-lsp-installer/process.lua:149: Job pid=83601 exited with exit_code=0, signal=0
[DEBUG Tue 11 Jan 2022 04:27:22 PM UTC] ...nvim-lsp-installer/lua/nvim-lsp-installer/core/fetch.lua:29: Successfully fetched URL "https://api.github.com/repos/sumneko/vscode-lua/releases"
[DEBUG Tue 11 Jan 2022 04:27:22 PM UTC] ...installer/lua/nvim-lsp-installer/core/clients/github.lua:56: Resolved latest version repo="sumneko/vscode-lua", tag_name="v2.5.6"
[DEBUG Tue 11 Jan 2022 04:27:22 PM UTC] ...rt/nvim-lsp-installer/lua/nvim-lsp-installer/process.lua:117: Spawning cmd="wget", spawn_opts={
args = { "--header", "User-Agent: nvim-lsp-installer (+https://github.com/williamboman/nvim-lsp-installer)", "-nv", "-O", "archive.zip", "https://github.com/sumneko/vscode-lua/releases/download/v2.5.6/vscode-lua-v2.5.6-linux-x64.vsix" },
cwd = "/Users/jeremy.satterfield/.local/share/nvim/lsp_servers/sumneko_lua.tmp"
}
[DEBUG Tue 11 Jan 2022 04:27:22 PM UTC] ...rt/nvim-lsp-installer/lua/nvim-lsp-installer/process.lua:163: Spawned with pid 83616
[DEBUG Tue 11 Jan 2022 04:27:22 PM UTC] ...rt/nvim-lsp-installer/lua/nvim-lsp-installer/process.lua:149: Job pid=83602 exited with exit_code=0, signal=0
[DEBUG Tue 11 Jan 2022 04:27:23 PM UTC] ...rt/nvim-lsp-installer/lua/nvim-lsp-installer/process.lua:149: Job pid=83616 exited with exit_code=0, signal=0
[DEBUG Tue 11 Jan 2022 04:27:23 PM UTC] ...rt/nvim-lsp-installer/lua/nvim-lsp-installer/process.lua:117: Spawning cmd="unzip", spawn_opts={
args = { "-d", ".", "archive.zip" },
cwd = "/Users/jeremy.satterfield/.local/share/nvim/lsp_servers/sumneko_lua.tmp"
}
[DEBUG Tue 11 Jan 2022 04:27:23 PM UTC] ...rt/nvim-lsp-installer/lua/nvim-lsp-installer/process.lua:163: Spawned with pid 83618
[DEBUG Tue 11 Jan 2022 04:27:35 PM UTC] ...rt/nvim-lsp-installer/lua/nvim-lsp-installer/process.lua:149: Job pid=83618 exited with exit_code=0, signal=0
[DEBUG Tue 11 Jan 2022 04:27:35 PM UTC] ...r/start/nvim-lsp-installer/lua/nvim-lsp-installer/fs.lua:22: fs: rmrf /Users/jeremy.satterfield/.local/share/nvim/lsp_servers/sumneko_lua.tmp/archive.zip
[DEBUG Tue 11 Jan 2022 04:27:35 PM UTC] ...art/nvim-lsp-installer/lua/nvim-lsp-installer/server.lua:152: Promoting installation directory "/Users/jeremy.satterfield/.local/share/nvim/lsp_servers/sumneko_lua.tmp" for "sumneko_lua"
[DEBUG Tue 11 Jan 2022 04:27:35 PM UTC] ...r/start/nvim-lsp-installer/lua/nvim-lsp-installer/fs.lua:22: fs: rmrf /Users/jeremy.satterfield/.local/share/nvim/lsp_servers/sumneko_lua
[DEBUG Tue 11 Jan 2022 04:27:38 PM UTC] ...r/start/nvim-lsp-installer/lua/nvim-lsp-installer/fs.lua:51: fs: mkdir /Users/jeremy.satterfield/.local/share/nvim/lsp_servers/sumneko_lua
[DEBUG Tue 11 Jan 2022 04:27:38 PM UTC] ...r/start/nvim-lsp-installer/lua/nvim-lsp-installer/fs.lua:33: fs: rename /Users/jeremy.satterfield/.local/share/nvim/lsp_servers/sumneko_lua.tmp /Users/jeremy.satterfield/.local/share/nvim/lsp_servers/sumneko_lua
[DEBUG Tue 11 Jan 2022 04:27:38 PM UTC] ...art/nvim-lsp-installer/lua/nvim-lsp-installer/server.lua:173: Successfully promoted install_dir="/Users/jeremy.satterfield/.local/share/nvim/lsp_servers/sumneko_lua.tmp" for "sumneko_lua"
[DEBUG Tue 11 Jan 2022 04:27:38 PM UTC] ...r/start/nvim-lsp-installer/lua/nvim-lsp-installer/fs.lua:22: fs: rmrf /Users/jeremy.satterfield/.local/share/nvim/lsp_servers/sumneko_lua.tmp
[DEBUG Tue 11 Jan 2022 04:27:38 PM UTC] ...r/start/nvim-lsp-installer/lua/nvim-lsp-installer/fs.lua:25: fs: rmrf failed
[DEBUG Tue 11 Jan 2022 04:27:38 PM UTC] ...r/start/nvim-lsp-installer/lua/nvim-lsp-installer/fs.lua:97: fs: write_file "/Users/jeremy.satterfield/.local/share/nvim/lsp_servers/sumneko_lua/nvim-lsp-installer-receipt.json"
[INFO Tue 11 Jan 2022 04:27:38 PM UTC] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:683: Installation completed server_name="sumneko_lua", success=true
[DEBUG Tue 11 Jan 2022 04:27:39 PM UTC] ...nvim-lsp-installer/lua/nvim-lsp-installer/ui/display.lua:204: Deleting window
nvim-lsp-installer-receipt.json for sumneko_lua
{"name":"sumneko_lua","primary_source":{"release":"v2.5.6","type":"github_release_file","repo":"sumneko\/vscode-lua","file":"https:\/\/github.com\/sumneko\/vscode-lua\/releases\/download\/v2.5.6\/vscode-lua-v2.5.6-linux-x64.vsix"},"schema_version":"1.0a","metrics":{"completion_time":1641918458151,"start_time":1641918441604},"secondary_sources":[]}
Hello! Huh that seems really odd. Which system are you able to repro this on? It seems like uv_fs_rename
is behaving differently. I run this plugin on many different UNIX machines (macOS, Ubuntu 20.04 x64 & arm64) as well as testing it on other Linux distros and archs using Docker and never seen this behavior.
What does the following produce:
$ uname -a
$ lsb_release -a
$ nvim --headless -c "lua print(vim.loop.version_string())" -c q
Also, are you able to reproduce while running branch dont-prepare-root-dir
?
Using that branch seems to fix it. Any idea on where it is on the roadmap?
But in case it's helpful, here's the feedback you asked for:
$ uname -a
Linux a9c2b332b2e4 5.10.76-linuxkit #1 SMP Mon Nov 8 10:21:19 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal
$ nvim --headless -c "lua print(vim.loop.version_string())" -c q
1.42.0
Where what is on which roadmap :D? The thing is that what I've removed in dont-prepare-root-dir
will break other Linux systems, where the rename
operation will fail if the target doesn't already exist (I will need to revisit this to check whether this is still valid though).
I simply can't reproduce this on any system, for example, I'm running the following docker container:
$ uname -a
Linux c70a7afae3d2 5.10.47-linuxkit #1 SMP PREEMPT Sat Jul 3 21:50:16 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
LSB Version: core-11.1.0ubuntu2-noarch:security-11.1.0ubuntu2-noarch
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal
Would you happen to have a public docker image that I could reproduce this in?
What filesystems are you running on the host machines? Also what does the following give?
$ docker info | grep -i -e 'backing filesystem' -e 'storage driver'
I faced this problem on Ubuntu 20.04 // WSL2 (not using docker).
A few failures popped up in the install logs when I tried to add new language servers:
[INFO Tue Jan 11 13:48:59 2022] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:664: Starting install server_name="jedi_language_server", requested_version=""
[INFO Tue Jan 11 13:49:03 2022] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:683: Installation completed server_name="jedi_language_server", success=true
[INFO Tue Jan 11 13:52:17 2022] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:664: Starting install server_name="solargraph", requested_version=""
[INFO Tue Jan 11 13:52:19 2022] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:683: Installation completed server_name="solargraph", success=false
[INFO Wed Jan 12 10:41:14 2022] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:664: Starting install server_name="sorbet", requested_version=""
[INFO Wed Jan 12 10:41:15 2022] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:683: Installation completed server_name="sorbet", success=true
[INFO Wed Jan 12 14:05:21 2022] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:664: Starting install server_name="bashls", requested_version=""
[INFO Wed Jan 12 14:05:21 2022] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:664: Starting install server_name="cssls", requested_version=""
[INFO Wed Jan 12 14:05:21 2022] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:664: Starting install server_name="dockerls", requested_version=""
[INFO Wed Jan 12 14:05:21 2022] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:664: Starting install server_name="eslint", requested_version=""
[INFO Wed Jan 12 14:05:29 2022] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:683: Installation completed server_name="dockerls", success=true
[INFO Wed Jan 12 14:05:29 2022] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:664: Starting install server_name="graphql", requested_version=""
[INFO Wed Jan 12 14:05:30 2022] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:683: Installation completed server_name="cssls", success=true
[INFO Wed Jan 12 14:05:30 2022] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:664: Starting install server_name="html", requested_version=""
[INFO Wed Jan 12 14:05:30 2022] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:683: Installation completed server_name="eslint", success=true
[INFO Wed Jan 12 14:05:30 2022] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:664: Starting install server_name="jsonls", requested_version=""
[INFO Wed Jan 12 14:05:32 2022] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:683: Installation completed server_name="html", success=true
[INFO Wed Jan 12 14:05:32 2022] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:664: Starting install server_name="ocamlls", requested_version=""
[INFO Wed Jan 12 14:05:32 2022] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:683: Installation completed server_name="bashls", success=true
[INFO Wed Jan 12 14:05:32 2022] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:664: Starting install server_name="sqlls", requested_version=""
[INFO Wed Jan 12 14:05:33 2022] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:683: Installation completed server_name="jsonls", success=true
[INFO Wed Jan 12 14:05:33 2022] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:664: Starting install server_name="sumneko_lua", requested_version=""
[ERROR Wed Jan 12 14:05:33 2022] ...rt/nvim-lsp-installer/lua/nvim-lsp-installer/process.lua:153: Failed to spawn process. cmd="gh", err="ENOENT: no such file or directory"
[INFO Wed Jan 12 14:05:34 2022] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:683: Installation completed server_name="sumneko_lua", success=true
[INFO Wed Jan 12 14:05:34 2022] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:664: Starting install server_name="tailwindcss", requested_version=""
[INFO Wed Jan 12 14:05:36 2022] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:683: Installation completed server_name="ocamlls", success=true
[INFO Wed Jan 12 14:05:36 2022] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:664: Starting install server_name="yamlls", requested_version=""
[INFO Wed Jan 12 14:05:37 2022] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:683: Installation completed server_name="tailwindcss", success=true
[INFO Wed Jan 12 14:05:38 2022] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:683: Installation completed server_name="yamlls", success=true
[INFO Wed Jan 12 14:05:40 2022] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:683: Installation completed server_name="graphql", success=true
[ERROR Wed Jan 12 14:05:45 2022] ...rt/nvim-lsp-installer/lua/nvim-lsp-installer/process.lua:153: Failed to spawn process. cmd="gh", err="ENOENT: no such file or directory"
[INFO Wed Jan 12 14:06:43 2022] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:683: Installation completed server_name="sqlls", success=true
[ERROR Wed Jan 12 14:07:56 2022] ...rt/nvim-lsp-installer/lua/nvim-lsp-installer/process.lua:153: Failed to spawn process. cmd="gh", err="ENOENT: no such file or directory"
The problem seems to be what you mentioned here @jsatt. Switching to the dont-prepare-root-dir
branch of nvim-lsp-installer
has solved the matter.
Output from the debug commands you mentioned above:
$ uname -a
Linux {machine_name} 4.19.84-microsoft-standard #1 SMP Wed Nov 13 11:44:37 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal
$ nvim --headless -c "lua print(vim.loop.version_string())" -c q
1.42.0
@oneroyalace Thanks for reporting. I'm not surprised to hear you're on WSL, it has a tendency to be a bit... odd 🙈. Could you provide what the following gives you:
$ docker info | grep -i -e 'backing filesystem' -e 'storage driver'
I don't have docker installed. Running everything directly in WSL
Ah. What does df -T
give you?
I also get this error on OSX 11.6.2 (Big Sur). The exact error pops up in vim when I run a file that has an LSP installed for it, like a lua file, which is
[nvim-lsp-installer] ...im/HEAD-2ecf0a4_1/share/nvim/runtime/lua/vim/lsp/rpc.lua:328: start `lua-language-server` failed: ENOENT: no such file or directory
Running the commands you were asking the others to run, except lsb_release
since that seems to be Linux only, I get these
$ uname -a
Darwin EduMart-MBP 20.6.0 Darwin Kernel Version 20.6.0: Wed Nov 10 22:23:07 PST 2021; root:xnu-7195.141.14~1/RELEASE_X86_64 x86_64
$ nvim --headless -c "lua print(vim.loop.version_string())" -c q
1.42.0
df -T
throws an error because it needs an input afterwards. Assuming you meant a lowercase 't', this is what I get
$ df -t
Filesystem 512-blocks Used Available Capacity iused ifree %iused Mounted on
/dev/disk1s2s1 976490576 29927736 498270648 6% 553786 4881899094 0% /
devfs 389 389 0 100% 674 0 100% /dev
/dev/disk1s5 976490576 4194360 498270648 1% 4 4882452876 0% /System/Volumes/VM
/dev/disk1s3 976490576 830216 498270648 1% 2259 4882450621 0% /System/Volumes/Preboot
/dev/disk1s6 976490576 7312 498270648 1% 21 4882452859 0% /System/Volumes/Update
/dev/disk1s1 976490576 441721880 498270648 47% 2868639 4879584241 0% /System/Volumes/Data
map auto_home 0 0 0 100% 0 0 100% /System/Volumes/Data/home
/Library/Application Support/PenDriver/PenTablet_Driver.app 976490576 440299072 503887776 47% 2866824 4879586056 0% /private/var/folders/x3/8qx7xg2x5zvg7kgyhtgl3m8w0000gn/T/AppTranslocation/3379BD24-764F-4334-892C-57C75A95BF88
/Library/Application Support/PenDriver/PenTabletInfo.app 976490576 440756696 503430152 47% 2867455 4879585425 0% /private/var/folders/x3/8qx7xg2x5zvg7kgyhtgl3m8w0000gn/T/AppTranslocation/924A9FFB-6996-482A-AA15-020DED3F5FFB
Switching to dont-prepare-root-dir
unfortunately doesn't work, though it seems like uninstalling all my lsp servers and reinstalling them did the trick.
df -T throws an error because it needs an input afterwards. Assuming you meant a lowercase 't', this is what I get
Ah I guess BSD df behaves differently. With GNU df it gives you the filesystem type (like, ext4).
Switching to
dont-prepare-root-dir
unfortunately doesn't work, though it seems like uninstalling all my lsp servers and reinstalling them did the trick.
Hm did you recently upgrade plugin versions? Also has it been a while since you last installed sumneko_lua?
Hm did you recently upgrade plugin versions? Also has it been a while since you last installed sumneko_lua?
Yes and yes. I upgraded today after about a month? And the installation definitely was a while ago!
Here's my filesystem info:
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/sdb ext4 263174212 12004440 237731616 5% /
tmpfs tmpfs 13109676 0 13109676 0% /mnt/wsl
tools 9p 487805948 381832596 105973352 79% /init
none devtmpfs 13107200 0 13107200 0% /dev
none tmpfs 13109676 108 13109568 1% /run
none tmpfs 13109676 0 13109676 0% /run/lock
none tmpfs 13109676 16 13109660 1% /run/shm
none tmpfs 13109676 0 13109676 0% /run/user
tmpfs tmpfs 13109676 0 13109676 0% /sys/fs/cgroup
drivers 9p 487805948 381832596 105973352 79% /usr/lib/wsl/drivers
lib 9p 487805948 381832596 105973352 79% /usr/lib/wsl/lib
C:\ 9p 487805948 381832596 105973352 79% /mnt/c
D:\ 9p 460796 14220 446576 4% /mnt/d
E:\ 9p 7814024188 1624243244 6189780944 21% /mnt/e
F:\ 9p 15728640 11450296 4278344 73% /mnt/f
G:\ 9p 1953382396 1925646484 27735912 99% /mnt/g
I installed LSPs for the first time when I saw the error.
I can confirm that this is an issue since https://github.com/williamboman/nvim-lsp-installer/commit/095ab4eb6a02d5fd3ea4b782a0e868e2c65e4427 it works for some LSP (like lua) but for others (like haskell) I do get the "The language server is either not installed, missing from PATH, or not executable". Simply reverting to the commit before the one mentioned make the error go away.
@AnonymusRaccoon Hm which servers stops working with that commit? It's not supposed to really have changed anything. There's also a suite of tests for all servers that are passing just fine (on Mac). Have you peeked into the installation directory to see whether it's due to the same issue as the OP is reporting?
edit: Oh also, from the sound of it, you will most likely be able to fix the issue by just reinstalling the problematic servers. There have been some cases where there's been some breaking changes to a server that is not compatible with older versions (#340 aims to mitigate this)
I don't really know why, but now using the latest version I can't reproduce the bug. It was my first time setting up neovim, so I may have done something wrong the first time. Sorry for the noise.
OK, I've finally had some time to research the issue as I'm experiencing it. When I initially reported the issue I was still in the middle of migrating from a Vim/Nvim compatible config to a standalone Neovim w/ Lua config with all the new hotness. As I have completed this migration, my bare-metal Linux install does now work exactly as expected with the latest version of the plugin.
However, my day-to-day environment (read: work) is an Ubuntu container running on Docker for Mac, and I am still experiencing the problem there. I've narrowed down the issue to only happening when the directory that the lsp servers get installed to (~/.local/share/nvim
) is part of a volume mounted from the host machine. Specifically, when no volume is mounted it installs as expected, when mounted it installs with the *.tmp issue I described in my initial report.
I realize at this point that this is likely an extreme edge case that's a problem with Docker, so I'd be fine if you want to call this out of scope and I'll just deal with it on my own. But if you think this is related to the other folks issues above I'm happy to help. I've created a (fairly) minimal Dockerfile which is capable of reproducing the issue which is linked below along with the other details requested above.
Dockerfile: https://github.com/jsatt/nvim-lspinstaller-test Versions: Docker Desktop: 4.3.2 (72729) Docker Engine: 20.10.11 MacOS: 12.1 Neovim: appimage 0.6.1 Ubuntu: 20.04 nvim-lsp-installer: latest commit lsp servers: fresh installs via lsp-installer
# run from container
$ uname -a
Linux a9c2b332b2e4 5.10.76-linuxkit #1 SMP Mon Nov 8 10:21:19 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal
$ nvim --headless -c "lua print(vim.loop.version_string())" -c q
1.42.0
$ df -T
Filesystem Type 1K-blocks Used Available Use% Mounted on
overlay overlay 61255492 11218724 46895444 20% /
tmpfs tmpfs 65536 0 65536 0% /dev
shm tmpfs 65536 0 65536 0% /dev/shm
tmpfs tmpfs 203300 536 202764 1% /run/docker.sock
grpcfuse fuse.grpcfuse 488245288 87429836 400815452 18% /Users/jeremy.satterfield
/dev/vda1 ext4 61255492 11218724 46895444 20% /etc/hosts
# run on host
$ docker info | grep -i -e 'backing filesystem' -e 'storage driver'
Storage Driver: overlay2
Backing Filesystem: extfs
$ df -t
Filesystem 512-blocks Used Available Capacity iused ifree %iused Mounted on
/dev/disk1s5s1 976490576 30764128 801630104 4% 577263 4008150520 0% /
devfs 387 387 0 100% 670 0 100% /dev
/dev/disk1s4 976490576 4194344 801630104 1% 2 4008150520 0% /System/Volumes/VM
/dev/disk1s2 976490576 585832 801630104 1% 1218 4008150520 0% /System/Volumes/Preboot
/dev/disk1s6 976490576 944 801630104 1% 18 4008150520 0% /System/Volumes/Update
/dev/disk1s1 976490576 136858184 801630104 15% 1088257 4008150520 0% /System/Volumes/Data
map auto_home 0 0 0 100% 0 0 100% /System/Volumes/Data/home
Ahh thanks for the thorough investigation @jsatt! I figured it was probably something going on with the fs. Do I understand you correctly that you have a volume mounted at the container path ~/.local/share/nvim
($ docker inspect <container> | jq -r '.[].Mounts[].Destination'
)?
This honestly sounds like a potential bug somewhere outside of this plugin. uv_fs_rename
is being used here, which calls rename(2)
under the hood on POSIX systems. I've read through that man page at least twice now to make sure I've not misunderstood it haha
I guess what you could do, should you want to keep that volume mount, is to change the installation directory to somewhere else lsp_installer.settings { install_root_dir = "/wherever" }
. I think it'd be really nice to be able to use a dedicated volume for LSP server installations though, so that you can let your containers be ephemeral and just mount the LSP servers across short-lived container instances. I definitely think it is worth getting to the bottom of this. I'll try to get a repro going locally, and then investigate whether we can reliably detect if this behavior will manifest itself (and in which case we can just skip "preparing the server root dir").
In my real environment I actually have my entire $HOME mounted into the volume from the host, but in my testing and for clarity sake in the Dockerfile it was just easier to mount the .local and it has the same issue in both cases. I actually really like the idea of changing the install_root_dir. And I also just thought about possibly having a regular Docker volume for just the .local or lsp_servers directories and letting the rest of $HOME continue to be a mount. I think at least one of those two will work for me enough.
As I said, I'm happy to call this my issue for now. Close if you'd like or ping me if you'd like more feedback/testing if it can help the other folks in the thread.
Let's keep it open for discoverability :+1:
- do you have free inodes in
/var/lib/docker/overlay2
? sincerename()
won't work if you run out of links - are you running rootless docker?
- did you try
rename()
manually? you should be able to see the exact spawned command in the log
I faced similar problem in WSL1. Neovim can't find the executable previously installed by nvim-lsp-installer: The language server is either not installed, missing from PATH, or not executable.
$ uname -a
Linux Henry-PC 4.4.0-19041-Microsoft #1237-Microsoft Sat Sep 11 14:32:00 PST 2021 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal
$ df -T
Filesystem Type 1K-blocks Used Available Use% Mounted on
rootfs wslfs 487173700 132150384 355023316 28% /
none tmpfs 487173700 132150384 355023316 28% /dev
none tmpfs 487173700 132150384 355023316 28% /run
none tmpfs 487173700 132150384 355023316 28% /run/lock
none tmpfs 487173700 132150384 355023316 28% /run/shm
none tmpfs 487173700 132150384 355023316 28% /run/user
tmpfs tmpfs 487173700 132150384 355023316 28% /sys/fs/cgroup
C:\ drvfs 487173700 132150384 355023316 28% /mnt/c
D:\ drvfs 1943403496 717742112 1225661384 37% /mnt/d
E:\ drvfs 976744444 911965944 64778500 94% /mnt/e
G:\ drvfs 1943403496 779025184 1164378312 41% /mnt/g
Updated:
I thought that this is due to misconfiguration. I'll hide this comment.
I'm still getting this issue. Should note that I'm using rootless Docker.