vscode
vscode copied to clipboard
Vitest failes to start in vscode >=1.90 when using Yarn PnP
Describe the bug
With latest VSCode (version 1.90.2) the extension fails to start Vitest in a project setup with Yarn PnP:
Downgrading VSCode to version 1.89.1 results in Vitest process being successfully created:
I suspect it has to do with Electron upgrade in latest VSCode release that comes bundled with Node.js 20.
Reproduction
https://github.com/Nithanim-Work/vitest-reproducer (reusing minimal example from https://github.com/vitest-dev/vscode/issues/416)
Output
[INFO 21:10:03] [v0.12.4] Vitest extension is activated because Vitest is installed or there is a Vite/Vitest config file in the workspace.
[INFO 21:10:04] [API] Running Vitest vpnp (web/vitest.config.ts) with Node.js: /Users/fima/.asdf/shims/node
[Error 21:10:05] [Error Error] Vitest failed to start:
y
Error: Vitest failed to start:
y
at ChildProcess.f (/Users/fima/.vscode/extensions/vitest.explorer-0.12.4/dist/extension.js:18:5392)
at ChildProcess.emit (node:events:514:28)
at emit (node:internal/child_process:951:14)
at process.processTicksAndRejections (node:internal/process/task_queues:83:21)
Version
0.12.4
Validations
- [X] Check that you are using the latest version of the extension
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- [X] The provided reproduction is a minimal reproducible example of the bug.