Closed Esurnir closed 2 months ago
This bug report is totally related to this discussion: https://github.com/vitest-dev/vscode/discussions/378 . With a great addition: A correlation with volta is made.
I got some news !
This is due to the fact the extension is using the execPath option to point to volta instead of not using the option.
Repro here sorry in advance I was trying different things in that repo to reproduce the issue.
How to reproduce (sorry I put the working test case in the repo, to get the failing case, uncomment execPath): Without execPath everything works great.
D:\Git\Labo\voltaprocess>"C:\Program Files\Volta\node.EXE" index.js
stdout: Dad is here
PARENT got message: Hello dad ! stdout: path: D:\Git\Labo\voltaprocess
stdout: CHILD got message: parent -> child
^C^C
Now uncomment execPath, the process exit and the parent doesn't get any output on the message event, everything broken.
Output :
```cmd
D:\Git\Labo\voltaprocess>"C:\Program Files\Volta\node.EXE" index.js
stdout: Dad is here
stdout: path: D:\Git\Labo\voltaprocess
Child exited output Dad is here
path: D:\Git\Labo\voltaprocess
D:\Git\Labo\voltaprocess>
We need to point to user's Node.js, not VSCode's instance. This doesn't fix the issue, but creates another.
Created an issue on volta about the issue.
The command "volta which node" output the executable that'll be run in the current folder (if we decide to add a volta workaround and volta just can't relay the ipc messages).
D:\Git\Labo\voltaprocess>volta which node
C:\Users\jbzeller\AppData\Local\Volta\tools\image\node\20.13.1\node.exe
D:\Git\Labo\voltaprocess>
The command "volta which node" output the executable that'll be run in the current folder (if we decide to add a volta workaround and volta just can't relay the ipc messages).
PR welcome to add support for this, shouldn't be hard to do
Describe the bug
When running visual studio code on a system using volta (With lts installed as the default node version). The visual studio code extension fail to start.
It seems to open the node process with the
"C:\Program Files\Volta\node.EXE" --dns-result-order=ipv4first C:/Users/jbzeller/.vscode/extensions/vitest.explorer-0.10.2/dist/worker.js
command line. which seems to open then close immediately without error. The command is then relayed to the real node installation.Reproduction
Output
Version
0.10.2
Validations