williamboman/mason.nvim

Mason installs vscode packages wrong

Joniator opened this issue · 0 comments

I've searched open issues for similar requests

  • Yes

I've recently downloaded the latest plugin version of mason.nvim

  • Yes

Problem description

Mason seems to install multiple packaages using extracted vscode servers wrong.

Expected behavior

If I run .local/share/nvim/mason/bin/{tailwindcss-lanuage-server or vscode-html-language-server}, it should correctly link to the installed package.

But the scripts in masons bin-directory point to $basedir/../vscode-langservers-extracted/bin/vscode-html-language-server, which does not exist. Mason downloads the files into local/share/nvim/mason/html-lsp and tailwindcss-language-server, but the bins dont reflect that.

I installed the extracted npm packages globally, but I would expect mason to correctly check out the files, and link it correctly.

Running the scripts in bin yield the following:

node:internal/modules/cjs/loader:1147
  throw err;
  ^

Error: Cannot find module '/home/jonnyb/.local/share/nvim/mason/vscode-langservers-extracted/bin/vscode-html-language-server'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
    at Module._load (node:internal/modules/cjs/loader:985:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
    at node:internal/main/run_main_module:28:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v20.11.1

Affected packages

tailwindcss, html

Mason output

Installs successfully

Installation log

[DEBUG Fri Feb 23 16:59:37 2024] ...mason.nvim/lua/mason-core/installer/registry/schemas.lua:52: schemas: download Package(name=html-lsp) {
  lsp = "vscode:https://raw.githubusercontent.com/microsoft/vscode/main/extensions/html-language-features/package.json"
}
[DEBUG Fri Feb 23 16:59:37 2024] .../.local/share/nvim/lazy/mason.nvim/lua/mason-core/fs.lua:65: fs: mkdir /home/jonnyb/.local/share/nvim/mason/staging/html-lsp/mason-schemas
[DEBUG Fri Feb 23 16:59:37 2024] ...ocal/share/nvim/lazy/mason.nvim/lua/mason-core/fetch.lua:37: Fetching URL "https://raw.githubusercontent.com/microsoft/vscode/main/extensions/html-language-features/package.json"
[DEBUG Fri Feb 23 16:59:37 2024] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:116: Spawning cmd="curl", spawn_opts={
  args = { "-H", "User-Agent: mason.nvim v1.10.0 (+https://github.com/williamboman/mason.nvim)", "-fsSL", "-X", "GET", "--connect-timeout", 30, "https://raw.githubusercontent.com/microsoft/vscode/main/extensions/html-language-features/package.json" }
}
[DEBUG Fri Feb 23 16:59:37 2024] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:162: Spawned with pid 252789
[DEBUG Fri Feb 23 16:59:37 2024] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:148: Job pid=252789 exited with exit_code=0, signal=0
[DEBUG Fri Feb 23 16:59:37 2024] ...zy/mason.nvim/lua/mason-core/installer/registry/link.lua:139: Registering bin links Package(name=html-lsp) {
  ["vscode-html-language-server"] = "npm:vscode-html-language-server"
}
[DEBUG Fri Feb 23 16:59:37 2024] ...zy/mason.nvim/lua/mason-core/installer/registry/link.lua:166: Expanded bin link "vscode-html-language-server" -> "node_modules/.bin/vscode-html-language-server"
[DEBUG Fri Feb 23 16:59:37 2024] ...vim/lazy/mason.nvim/lua/mason-core/installer/context.lua:138: Setting exec flags on file "node_modules/.bin/vscode-html-language-server" 100644 -> 100755
[DEBUG Fri Feb 23 16:59:37 2024] ...vim/lazy/mason.nvim/lua/mason-core/installer/context.lua:229: Promoting cwd "/home/jonnyb/.local/share/nvim/mason/staging/html-lsp" to "/home/jonnyb/.local/share/nvim/mason/packages/html-lsp"
[DEBUG Fri Feb 23 16:59:37 2024] .../.local/share/nvim/lazy/mason.nvim/lua/mason-core/fs.lua:65: fs: mkdir /home/jonnyb/.local/share/nvim/mason/packages/html-lsp
[DEBUG Fri Feb 23 16:59:37 2024] .../.local/share/nvim/lazy/mason.nvim/lua/mason-core/fs.lua:84: fs: rename /home/jonnyb/.local/share/nvim/mason/staging/html-lsp /home/jonnyb/.local/share/nvim/mason/packages/html-lsp
[DEBUG Fri Feb 23 16:59:37 2024] ...nvim/lazy/mason.nvim/lua/mason-core/installer/linker.lua:137: Linking Package(name=html-lsp)
[DEBUG Fri Feb 23 16:59:37 2024] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:39: Building receipt for Package(name=html-lsp)[DEBUG Fri Feb 23 16:59:37 2024] .../.local/share/nvim/lazy/mason.nvim/lua/mason-core/fs.lua:59: fs: unlink /home/jonnyb/.local/share/nvim/mason/staging/html-lsp.lock
[INFO  Fri Feb 23 16:59:37 2024] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:245: Installation succeeded for Package(name=html-lsp)

Neovim version (>= 0.7)

NVIM v0.10.0-dev
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Run "nvim -V1 -v" for more info

Operating system/version

Linux Station 5.15.133.1-microsoft-standard-WSL2 #1 SMP Thu Oct 5 21:02:42 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Healthcheck

mason: require("mason.health").check()                                                                                                                                                                                                                                                  mason.nvim                                                                                                                                  - OK mason.nvim version v1.10.0                                                                                                             - OK PATH: prepend                                                                                                                          - OK Providers:                                                                                                                                 mason.providers.registry-api                                                                                                                mason.providers.client                                                                                                                  - OK neovim version >= 0.7.0                                                                                                                                                                                                                                                            mason.nvim [Registries]                                                                                                                     - OK Registry github.com/mason-org/mason-registry version: 2024-02-23-wordy-hunt is installed.                                                                                                                                                                                          mason.nvim [Core utils]                                                                                                                     - OK unzip: UnZip 6.00 of 20 April 2009, by Debian. Original by Info-ZIP.                                                                   - OK wget: GNU Wget 1.21.2 built on linux-gnu.                                                                                              - OK curl: curl 7.81.0 (x86_64-pc-linux-gnu) libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 libidn2/2.3.2 libpsl/0.21.    0 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.16                                                     - OK gzip: gzip 1.10                                                                                                                        - OK tar: tar (GNU tar) 1.34                                                                                                                - OK bash: GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)                                                                        - OK sh: Ok                                                                                                                                                                                                                                                                             mason.nvim [Languages]                                                                                                                      - WARNING cargo: not available                                                                                                                - ADVICE:                                                                                                                                     - spawn: cargo failed with exit code - and signal -. cargo is not executable                                                            - WARNING Composer: not available                                                                                                             - ADVICE:                                                                                                                                     - spawn: composer failed with exit code - and signal -. composer is not executable                                                      - WARNING PHP: not available                                                                                                                  - ADVICE:                                                                                                                                     - spawn: php failed with exit code - and signal -. php is not executable                                                                - WARNING luarocks: not available                                                                                                             - ADVICE:                                                                                                                                     - spawn: luarocks failed with exit code - and signal -. luarocks is not executable                                                      - WARNING Ruby: not available                                                                                                                 - ADVICE:                                                                                                                                     - spawn: ruby failed with exit code - and signal -. ruby is not executable                                                              - WARNING javac: not available                                                                                                                - ADVICE:                                                                                                                                     - spawn: javac failed with exit code - and signal -. javac is not executable                                                            - WARNING java: not available                                                                                                                 - ADVICE:                                                                                                                                     - spawn: java failed with exit code - and signal -. java is not executable                                                              - WARNING julia: not available                                                                                                                - ADVICE:                                                                                                                                     - spawn: julia failed with exit code - and signal -. julia is not executable                                                            - WARNING RubyGem: not available                                                                                                              - ADVICE:                                                                                                                                     - spawn: gem failed with exit code - and signal -. gem is not executable                                                                - OK python: Python 3.10.12                                                                                                                 - OK node: v20.11.1                                                                                                                         - OK Go: go version go1.21.1 linux/amd64                                                                                                    - WARNING pip: not available                                                                                                                  - ADVICE:                                                                                                                                     - spawn: python3 failed with exit code 1 and signal 0. /usr/bin/python3: No module named pip                                                                                                                                                                                        - OK python venv: Ok                                                                                                                        - OK npm: 9.5.1                                                                                                                                                                                                                                                                         mason.nvim [GitHub]                                                                                                                         - OK GitHub API rate limit. Used: 1. Remaining: 59. Limit: 60. Reset: Fri Feb 23 18:00:11 2024.                                               Install and authenticate via gh-cli to increase rate limit.

Screenshots

No response