Open yuhsienchiang opened 7 months ago
I met a similar issue to you. The following is from the MasonLog,
[ERROR Wed Apr 17 16:26:34 2024] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:249: Installation failed for Package(name=tailwindcss-language-server) error=spawn: npm failed with exit code 1 and signal 0.
[INFO Wed Apr 17 16:26:34 2024] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=lua-language-server) {}
[ERROR Wed Apr 17 16:26:34 2024] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:249: Installation failed for Package(name=html-lsp) error=spawn: npm failed with exit code 1 and signal 0.
[INFO Wed Apr 17 16:26:34 2024] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=graphql-language-service-cli) {}
[ERROR Wed Apr 17 16:26:34 2024] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:249: Installation failed for Package(name=css-lsp) error=spawn: npm failed with exit code 1 and signal 0.
But I can't find the log of Mason output e.g. under the folder /Users/
Same issue. Tried enabling debug mode in mason, but ERROR message is no more informative.
[DEBUG Thu Apr 25 16:44:35 2024] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:162: Spawned with pid 4168558
[DEBUG Thu Apr 25 16:44:35 2024] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:148: Job pid=4168558 exited with exit_code=1, signal=0
[DEBUG Thu Apr 25 16:44:35 2024] .../.local/share/nvim/lazy/mason.nvim/lua/mason-core/fs.lua:59: fs: unlink /home/devd/.local/share/nvim/mason/staging/pyright.lock
[DEBUG Thu Apr 25 16:44:35 2024] .../.local/share/nvim/lazy/mason.nvim/lua/mason-core/fs.lua:47: fs: rmrf /home/devd/.local/share/nvim/mason/staging/pyright
[DEBUG Thu Apr 25 16:44:35 2024] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:39: Building receipt for Package(name=pyright)
[ERROR Thu Apr 25 16:44:35 2024] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:249: Installation failed for Package(name=pyright) error=spawn: npm failed with exit code 1 and signal 0.
Healthcheck
- OK mason.nvim version v1.10.0
- OK PATH: skip
- 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-04-25-cleaver-mitten` is installed.
mason.nvim [Core utils] ~
- OK unzip: `UnZip 6.00 of 20 April 2009, by Info-ZIP. Maintained by C. Spieler. Send`
- OK wget: `GNU Wget 1.21.1 built on linux-gnu.`
- OK curl: `curl 8.6.0 (x86_64-pc-linux-gnu) libcurl/8.6.0 OpenSSL/1.1.1k-fips zlib/1.2.11 zstd/1.4.4 libidn2/2.2.0 libpsl/0.20.2 nghttp2/1.43.0`
- OK gzip: `gzip 1.9`
- OK gtar: `tar (GNU tar) 1.30`
- OK bash: `GNU bash, version 4.4.20(1)-release (x86_64-redhat-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
- OK Ruby: `ruby 2.5.9p229 (2021-04-05 revision 67939) [x86_64-linux]`
- OK node: `v20.10.0`
- OK Go: `go version go1.22.1 linux/amd64`
- WARNING julia: not available
- ADVICE:
- spawn: julia failed with exit code - and signal -. julia is not executable
- OK python: `Python 3.11.6`
- OK RubyGem: `2.7.6.3`
- OK java: `openjdk version "1.8.0_362"`
- OK javac: `Ok`
- OK npm: `10.2.3`
- OK pip: `pip 23.3.1 from /app/vbuild/RHEL8-x86_64/python/3.11-addons-pip-23.3.1/lib/python3.11/site-packages/pip (python 3.11)`
- OK python venv: `Ok`
Figured out! It was due to proxy. I ran the below command outside nvim,
npm install pyright
and it clearly showed me the error :)
I've encountered it and solved it, you guys can refer to it.
sudo chown -R 501:20 $HOME/.npm
I've encountered it and solved it, you guys can refer to it.
- I changed the .npm file registry, and when I restored the defaults, the error code became 243.
- Executing npm install XXX in the terminal prompted me to execute the following command, at which point my npm worked fine
sudo chown -R 501:20 $HOME/.npm
Such an undderated solution , You saved me hours.
This saves me too :). Thank you.
I have this issue and am on windows so the listed fix is not an option for me, any suggestions?
sudo chown -R 501:20 $HOME/.npm
I've searched open issues for similar requests
I've recently downloaded the latest plugin version of mason.nvim
Problem description
Everything used to work fine until yesterday when I tried to replace basedpyright with pyright. After finding out pyright could not be install, I had try to fix the issue by removing and reinstalling Mason and all my language servers. The list below shows all the language servers I install:
The installations for pyright, bashls, dotls, jsonls, yamlls failed, but others are fine.
My machine does have node and npm, and
npm install -g pyright
works fine, therefore I assume there is something wrong with Mason.Expected behavior
Successfully installing language servers.
Affected packages
pyright, bashls, dotls, jsonls, yamlls
Mason output
Installation log
Neovim version (>= 0.7)
NVIM v0.9.5 Build type: Release LuaJIT 2.1.1710088188
Operating system/version
Darwin Yus-MacBook-Pro 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:10:42 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6000 arm64
Healthcheck
Screenshots
No response