claude-code - 💡(How to fix) Fix pyright-lsp plugin fails with ENOENT uv_spawn on Windows [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#46702Fetched 2026-04-12 13:35:18
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×4

The pyright-lsp plugin fails to spawn pyright-langserver on Windows 11 with ENOENT: no such file or directory, uv_spawn 'pyright-langserver', despite the binary being installed and on the system PATH.

Error Message

Error performing findReferences: ENOENT: no such file or directory, uv_spawn 'pyright-langserver'

Root Cause

The pyright-lsp plugin fails to spawn pyright-langserver on Windows 11 with ENOENT: no such file or directory, uv_spawn 'pyright-langserver', despite the binary being installed and on the system PATH.

Code Example

Error performing findReferences: ENOENT: no such file or directory, uv_spawn 'pyright-langserver'

---

~/.claude/plugins/cache/claude-plugins-official/pyright-lsp/1.0.0/
└── README.md  (no bin/ directory, no bundled binary — relies on system PATH)
RAW_BUFFERClick to expand / collapse

Description

The pyright-lsp plugin fails to spawn pyright-langserver on Windows 11 with ENOENT: no such file or directory, uv_spawn 'pyright-langserver', despite the binary being installed and on the system PATH.

Environment

  • OS: Windows 11 Home 10.0.26200
  • Shell: Git Bash (via MINGW64)
  • Claude Code version: Latest (Opus 4.6 1M context)
  • Plugin: pyright-lsp@claude-plugins-official v1.0.0

Steps to Reproduce

  1. Enable plugin: pyright-lsp@claude-plugins-official: true in settings
  2. Install pyright via npm: npm install -g pyright (also tried pip install pyright)
  3. Verify binary is available: which pyright-langserver → found, pyright-langserver --stdio → starts successfully
  4. Verify Windows PATH includes the binary location: C:\Users\<user>\AppData\Roaming\npm confirmed via [Environment]::GetEnvironmentVariable('PATH', 'User')
  5. Restart Claude Code
  6. Use any LSP operation (e.g., findReferences)

Expected Behavior

LSP tool connects to pyright-langserver and returns code intelligence results.

Actual Behavior

Error performing findReferences: ENOENT: no such file or directory, uv_spawn 'pyright-langserver'

What I've Tried

  • pip install pyright → binary at AppData\Roaming\Python\Python314\Scripts\ (not on PATH initially)
  • Added to PATH via [Environment]::SetEnvironmentVariable and .bashrc
  • Copied binary to ~/bin (on Git Bash PATH)
  • npm install -g pyright → binary at AppData\Roaming\npm\ (confirmed on Windows system PATH)
  • 4+ restarts of Claude Code after each attempt
  • Confirmed Windows can spawn the process: Start-Process -FilePath 'pyright-langserver' succeeds in PowerShell

The binary is findable by both Git Bash and PowerShell but uv_spawn in the plugin process cannot resolve it. Suspect the Node.js/libuv process spawning in the plugin doesn't inherit or read the Windows user PATH correctly on Windows 11.

Plugin Cache Structure

~/.claude/plugins/cache/claude-plugins-official/pyright-lsp/1.0.0/
└── README.md  (no bin/ directory, no bundled binary — relies on system PATH)

🤖 Generated with Claude Code

extent analysis

TL;DR

The pyright-lsp plugin may not be able to spawn pyright-langserver due to issues with the Node.js process inheriting the Windows user PATH, so explicitly setting the PATH for the plugin or using an absolute path to the binary might resolve the issue.

Guidance

  • Verify that the pyright-langserver binary is in a directory that is included in the system PATH, and that the PATH is correctly set for the Node.js process.
  • Try setting the PATH environment variable explicitly for the Claude Code process or the pyright-lsp plugin to ensure it includes the directory containing the pyright-langserver binary.
  • Consider using an absolute path to the pyright-langserver binary in the plugin configuration, if possible, to bypass any PATH resolution issues.
  • Check if there are any differences in how the PATH is handled between Git Bash and the Node.js process, as this might be contributing to the issue.

Notes

The issue seems to be related to how the Node.js process inherits or reads the Windows user PATH on Windows 11, which might be different from how Git Bash or PowerShell handles it. The fact that the binary can be found and executed from Git Bash and PowerShell but not from the pyright-lsp plugin suggests a specific issue with the plugin's environment or configuration.

Recommendation

Apply workaround: Try setting the PATH environment variable explicitly for the Claude Code process or the pyright-lsp plugin to ensure it includes the directory containing the pyright-langserver binary, as this seems to be the most direct way to address the issue given the current information.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING