Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to solve mason.nvim [Core Utils] warnings

I`m trying to install pyright with mason, but the error

Failed
     󰚌 pyright
      ▼ Displaying full log
        spawn: npm.cmd failed with exit code - and signal -. npm.cmd is not executable

I investigated a little, and discovered that node.js was required, so I installed it. The error still persists using :Mason and :checkhealth I see the following warnigns.

mason.nvim [Core utils] ~
- WARNING unzip: not available
  - ADVICE:
    - spawn: unzip failed with exit code - and signal -. unzip is not executable
- WARNING wget: not available
  - ADVICE:
    - spawn: wget failed with exit code - and signal -. wget is not executable
- OK curl: `curl 8.0.1 (Windows) libcurl/8.0.1 Schannel WinIDN
`
- WARNING gzip: not available
  - ADVICE:
    - spawn: gzip failed with exit code - and signal -. gzip is not executable
- OK tar: `bsdtar 3.5.2 - libarchive 3.5.2 zlib/1.2.5.f-ipp bz2lib/1.0.6 
`
- ERROR pwsh: not available
  - ADVICE:
    - spawn: pwsh failed with exit code - and signal -. pwsh is not executable
- WARNING 7z: not available
  - ADVICE:
    - spawn: 7z failed with exit code - and signal -. 7z is not executable

mason.nvim [Languages] ~
- WARNING Go: not available
  - ADVICE:
    - spawn: go failed with exit code - and signal -. go is not executable
- WARNING cargo: not available
  - ADVICE:
    - spawn: cargo failed with exit code - and signal -. cargo 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 RubyGem: not available
  - ADVICE:
    - spawn: gem.cmd failed with exit code - and signal -. gem.cmd is not executable
- WARNING Composer: not available
  - ADVICE:
    - spawn: composer.bat failed with exit code - and signal -. composer.bat is not executable
- WARNING PHP: not available
  - ADVICE:
    - spawn: php failed with exit code - and signal -. php is not executable
- WARNING npm: not available
  - ADVICE:
    - spawn: npm.cmd failed with exit code - and signal -. npm.cmd is not executable
- WARNING node: not available
  - ADVICE:
    - spawn: node failed with exit code - and signal -. node is not executable
- WARNING javac: not available
  - ADVICE:
    - spawn: javac failed with exit code - and signal -. javac is not executable
- WARNING julia: not available
  - ADVICE:
    - spawn: julia failed with exit code - and signal -. julia is not executable
...
WhichKey: checking conflicting keymaps ~
- WARNING conflicting keymap exists for mode **"n"**, lhs: **"gc"**
- rhs: ` `
- WARNING conflicting keymap exists for mode **"n"**, lhs: **"gb"**
- rhs: ` 

the pwsh ERROR puzzles me, as I am currently running nvim on powershell, and from what I could find, pwsh means powershell.

like image 444
Ruan Carlo Weiers Britzke Avatar asked Oct 16 '25 07:10

Ruan Carlo Weiers Britzke


2 Answers

My bet is that node/npm is not in the PATH or maybe you need to restart neovim and/or powershell.

Regarding powershell and pwsh, you might be running neovim in legacy powershell instead of the new, portable pwsh (see What is the difference between [pwsh] and [Powershell Integrated Console] on VS Code?)

like image 85
Oskar Avatar answered Oct 18 '25 20:10

Oskar


As mentioned by @Oskar, pwsh.exe is a different Powershell installation, completely separate from "legacy" Windows Powershell and not included by default on Windows 10 machines.

I found some installation instructions here. Essentially you just need to run:

winget install --id Microsoft.Powershell --source winget

in a command line, which should also add it to your path. Check that your Windows version is newer than the version mentioned in the article, otherwise winget may not be available on your system, in which case you can try any of the other installation methods mentioned there.

like image 40
n00bmind Avatar answered Oct 18 '25 21:10

n00bmind