NodeJS 如何解决mason.nvim [Core Utils]警告

r7xajy2e  于 2023-08-04  发布在  Node.js
关注(0)|答案(1)|浏览(328)

我试图安装pyright与梅森,但错误

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

字符串
我调查了一下,发现node.js是必需的,所以我安装了它。错误仍然存在使用:Mason:checkhealth我看到以下警告。

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: `


pwsh错误让我感到困惑,因为我目前正在powershell上运行nvim,从我所能找到的来看,pwsh意味着powershell。

bbuxkriu

bbuxkriu1#

我打赌node/npm不在PATH中,或者你需要重新启动neovim和/或powershell。
关于powershell和pwsh,您可能正在旧版powershell中运行neovim,而不是新的可移植pwsh(请参阅What is the difference between [pwsh] and [Powershell Integrated Console] on VS Code?)。

相关问题