vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Vitest failes to start in vscode >=1.90 when using Yarn PnP

Open fmal opened this issue 1 year ago • 0 comments

Describe the bug

With latest VSCode (version 1.90.2) the extension fails to start Vitest in a project setup with Yarn PnP:

SCR-20240630-shux SCR-20240630-shxf

Downgrading VSCode to version 1.89.1 results in Vitest process being successfully created:

SCR-20240630-sfac SCR-20240630-sffl

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

fmal avatar Jun 30 '24 19:06 fmal