Can no longer find config file from 1.24.5+
Describe the bug
Yesterday the extension (1.24.4) worked.
Today it does not (1.24.5 and 1.24.6). These two version are not able to find the configuration file.
Nothing has changed since yesterday (same editor configs, same project config files, etc.).
Reproduction
Open VSCode and bring up the "Testing" sidebar.
Output
[INFO 10:40:58 AM] [v1.24.6] Vitest extension is activated because Vitest is installed or there is a Vite/Vitest config file in the workspace.
[INFO 10:40:59 AM] [API] Resolving configs: [REDACTED]/vite.config.ts
[INFO 10:40:59 AM] [API] Initiated ws connection via ws://localhost:53182
[INFO 10:40:59 AM] [API] Starting Vitest v3.2.3 ([REDACTED]/vite.config.ts) in the terminal: node C:/Users/[USER]/.vscode/extensions/vitest.explorer-1.24.6/dist/worker.js
[Error 10:41:04 AM] There were errors during config load.
[Error 10:41:04 AM] [Error Error] The extension could not connect to the terminal in 5 seconds. See the "vitest" terminal output for more details.
Error: The extension could not connect to the terminal in 5 seconds. See the "vitest" terminal output for more details.
at Timeout._onTimeout (c:\Users\[USER]\.vscode\extensions\vitest.explorer-1.24.6\dist\extension.js:13:3802)
at listOnTimeout (node:internal/timers:588:17)
at process.processTimers (node:internal/timers:523:7)
[Error 10:41:06 AM] [Error Error] The extension could not load any config.
Error: The extension could not load any config.
at kl (c:\Users\[USER]\.vscode\extensions\vitest.explorer-1.24.6\dist\extension.js:13:9918)
at Li._defineTestProfiles (c:\Users\[USER]\.vscode\extensions\vitest.explorer-1.24.6\dist\extension.js:25:2314)
at Li.defineTestProfiles (c:\Users\[USER]\.vscode\extensions\vitest.explorer-1.24.6\dist\extension.js:25:1701)
at Li.activate (c:\Users\[USER]\.vscode\extensions\vitest.explorer-1.24.6\dist\extension.js:25:7158)
at ME (c:\Users\[USER]\.vscode\extensions\vitest.explorer-1.24.6\dist\extension.js:25:662)
at Wb.n (file:///c:/Users/[USER]/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:120:13382)
at Wb.m (file:///c:/Users/[USER]/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:120:13345)
at Wb.l (file:///c:/Users/[USER]/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:120:12801)
Extension Version
1.24.6
Vitest Version
3.2.3
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.
The error in the output mentions the "vitest" terminal. What is in that terminal?
This is actual terminal output. Having same problem, vitest version 3.1.4, extension version: 1.24.6
This is actual terminal output. Having same problem, vitest version 3.1.4, extension version: 1.24.6
What “this”? The issue only shows the “output” logs, not the terminal output.
The author copy-pasted the content of the terminal output. See:
The author copy-pasted the content of the terminal output. See:
This is not the terminal, this is the output log channel. The terminal is in another tab (the tab is visible in your screenshot)
This error opens a new terminal window with logs that cannot be intercepted to show in the output
The same issue here. Spent half of the day figuring out what is triggering the problem. For now, just rolled back the extension. Moreover, vitest creates a terminal for each config file. It was not like this before. At least no terminals were left open. Also when VS Code is opened, it starts executing commands. For each command, a new Terminal is created.
Same here
The author copy-pasted the content of the terminal output. See:
This is not the terminal, this is the output log channel. The terminal is in another tab (the tab is visible in your screenshot)
This error opens a new terminal window with logs that cannot be intercepted to show in the output
So the terminal window is empty for me.
The same issue here. Spent half of the day figuring out what is triggering the problem. For now, just rolled back the extension. Moreover, vitest creates a terminal for each config file. It was not like this before. At least no terminals were left open. Also when VS Code is opened, it starts executing commands. For each command, a new Terminal is created.
The terminal is open only if it failed to load. Please show the terminal output if you have a problem described in the issue.
I have similar problem. The terminal output looks just like (I hope that it is what was requested):
node /home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.6/dist/worker.js
PS /home/adam/AdGuard/Bitbucket/scriptlets> node /home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.6/dist/worker.js
Screenshot
Output log:
[INFO 1:15:49 PM] [v1.24.6] Vitest extension is activated because Vitest is installed or there is a Vite/Vitest config file in the workspace.
[INFO 1:15:49 PM] [API] Resolving configs: scriptlets/vitest.config.ts
[INFO 1:15:49 PM] [API] Initiated ws connection via ws://localhost:45155
[INFO 1:15:49 PM] [API] Starting Vitest v2.1.8 (scriptlets/vitest.config.ts) in the terminal: node /home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.6/dist/worker.js
[Error 1:15:54 PM] There were errors during config load.
[Error 1:15:54 PM] [Error Error] The extension could not connect to the terminal in 5 seconds. See the "vitest" terminal output for more details.
Error: The extension could not connect to the terminal in 5 seconds. See the "vitest" terminal output for more details.
at Timeout._onTimeout (/home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.6/dist/extension.js:13:3802)
at listOnTimeout (node:internal/timers:588:17)
at process.processTimers (node:internal/timers:523:7)
[Error 1:15:55 PM] [Error Error] The extension could not load any config.
Error: The extension could not load any config.
at kl (/home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.6/dist/extension.js:13:9918)
at Li._defineTestProfiles (/home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.6/dist/extension.js:25:2314)
at Li.defineTestProfiles (/home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.6/dist/extension.js:25:1701)
at Li.activate (/home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.6/dist/extension.js:25:7158)
at ME (/home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.6/dist/extension.js:25:662)
at ub.n (file:///home/adam/.vscode-server-insiders/bin/0140ab3f1b383871c5ecc910cc0eba166607d485/out/vs/workbench/api/node/extensionHostProcess.js:112:13386)
at ub.m (file:///home/adam/.vscode-server-insiders/bin/0140ab3f1b383871c5ecc910cc0eba166607d485/out/vs/workbench/api/node/extensionHostProcess.js:112:13349)
at ub.l (file:///home/adam/.vscode-server-insiders/bin/0140ab3f1b383871c5ecc910cc0eba166607d485/out/vs/workbench/api/node/extensionHostProcess.js:112:12805)
Version 1.24.6
I have similar problem. The terminal output looks just like (I hope that it is what was requested):
node /home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.6/dist/worker.js PS /home/adam/AdGuard/Bitbucket/scriptlets> node /home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.6/dist/worker.jsScreenshot
Output log:
[INFO 1:15:49 PM] [v1.24.6] Vitest extension is activated because Vitest is installed or there is a Vite/Vitest config file in the workspace. [INFO 1:15:49 PM] [API] Resolving configs: scriptlets/vitest.config.ts [INFO 1:15:49 PM] [API] Initiated ws connection via ws://localhost:45155 [INFO 1:15:49 PM] [API] Starting Vitest v2.1.8 (scriptlets/vitest.config.ts) in the terminal: node /home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.6/dist/worker.js [Error 1:15:54 PM] There were errors during config load. [Error 1:15:54 PM] [Error Error] The extension could not connect to the terminal in 5 seconds. See the "vitest" terminal output for more details. Error: The extension could not connect to the terminal in 5 seconds. See the "vitest" terminal output for more details. at Timeout._onTimeout (/home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.6/dist/extension.js:13:3802) at listOnTimeout (node:internal/timers:588:17) at process.processTimers (node:internal/timers:523:7) [Error 1:15:55 PM] [Error Error] The extension could not load any config. Error: The extension could not load any config. at kl (/home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.6/dist/extension.js:13:9918) at Li._defineTestProfiles (/home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.6/dist/extension.js:25:2314) at Li.defineTestProfiles (/home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.6/dist/extension.js:25:1701) at Li.activate (/home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.6/dist/extension.js:25:7158) at ME (/home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.6/dist/extension.js:25:662) at ub.n (file:///home/adam/.vscode-server-insiders/bin/0140ab3f1b383871c5ecc910cc0eba166607d485/out/vs/workbench/api/node/extensionHostProcess.js:112:13386) at ub.m (file:///home/adam/.vscode-server-insiders/bin/0140ab3f1b383871c5ecc910cc0eba166607d485/out/vs/workbench/api/node/extensionHostProcess.js:112:13349) at ub.l (file:///home/adam/.vscode-server-insiders/bin/0140ab3f1b383871c5ecc910cc0eba166607d485/out/vs/workbench/api/node/extensionHostProcess.js:112:12805)Version 1.24.6
Yes, thank you! This is a stellar report.
I think I have found the issue and working on fixing it.
The fix is in 1.24.7. Please let me know if the extension now works properly. Thank you.
I confirm it's working in 1.24.7
Thank you for the fix, but unfortunately it doesn't work in my case.
Terminal log:
node /home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.7/dist/worker.js;
PS /home/adam/AdGuard/Bitbucket/scriptlets> node /home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.7/dist/worker.js;
Output:
[INFO 3:22:41 PM] [v1.24.7] Vitest extension is activated because Vitest is installed or there is a Vite/Vitest config file in the workspace.
[INFO 3:22:42 PM] [API] Resolving configs: scriptlets/vitest.config.ts
[INFO 3:22:43 PM] [TERMINAL] Initiated ws connection via ws://localhost:41753
[INFO 3:22:43 PM] [TERMINAL] Starting Vitest v2.1.8 (scriptlets/vitest.config.ts) in the terminal: node /home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.7/dist/worker.js;
[INFO 3:22:43 PM] [TERMINAL] Shell integration is initiated.
[Error 3:22:48 PM] There were errors during config load.
[Error 3:22:48 PM] [Error Error] The extension could not connect to the terminal in 5 seconds. See the "vitest" terminal output for more details.
Error: The extension could not connect to the terminal in 5 seconds. See the "vitest" terminal output for more details.
at Timeout._onTimeout (/home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.7/dist/extension.js:13:4772)
at listOnTimeout (node:internal/timers:588:17)
at process.processTimers (node:internal/timers:523:7)
[Error 3:22:49 PM] [Error Error] The extension could not load any config.
Error: The extension could not load any config.
at Nl (/home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.7/dist/extension.js:13:11233)
at Li._defineTestProfiles (/home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.7/dist/extension.js:25:2314)
at Li.defineTestProfiles (/home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.7/dist/extension.js:25:1701)
at Li.activate (/home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.7/dist/extension.js:25:7158)
at VE (/home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.7/dist/extension.js:25:662)
at ub.n (file:///home/adam/.vscode-server-insiders/bin/0140ab3f1b383871c5ecc910cc0eba166607d485/out/vs/workbench/api/node/extensionHostProcess.js:112:13386)
at ub.m (file:///home/adam/.vscode-server-insiders/bin/0140ab3f1b383871c5ecc910cc0eba166607d485/out/vs/workbench/api/node/extensionHostProcess.js:112:13349)
at ub.l (file:///home/adam/.vscode-server-insiders/bin/0140ab3f1b383871c5ecc910cc0eba166607d485/out/vs/workbench/api/node/extensionHostProcess.js:112:12805)
If it works for others, then perhaps it's something with my settings or there is another culprit. I'm not sure if it matters but I'm using it in WSL (probably matters because in not WSL it works correctly).
If I change vitest.shellType to child_process it works correctly.
I think that I found a problem.
It does not work if I set terminal.integrated.defaultProfile.linux to pwsh (in VSCode settings), but it works correctly with default value null (bash).
It does not work if I set
terminal.integrated.defaultProfile.linuxtopwsh(in VSCode settings), but it works correctly with default valuenull(bash).
It should still work with powershell 🤔 How do you connect vscode to WSL?
I'm just using Remote Explorer option and choose Connect in New Window.
Yeah, as discussed in the discord, I'm going through the very same. I'm on OSX and the only thing that gets things working again is by turning the shell type back to old default, child process. I've tried all the shell configs above, and messed around with my node version etc too, but nothing else has done anything.
Installed 1.24.7 and it looks like I am still having problems.
Terminal:
C:\Users\[USER]\Work\[PROJECT_ROOT]>node C:/Users/[USER]/.vscode/extensions/vitest.explorer-1.24.7/dist/worker.js;
node:internal/modules/cjs/loader:1404
throw err;
^
Error: Cannot find module 'C:\Users\[USER]\.vscode\extensions\vitest.explorer-1.24.7\dist\worker.js;'
at Function._resolveFilename (node:internal/modules/cjs/loader:1401:15)
at defaultResolveImpl (node:internal/modules/cjs/loader:1057:19)
at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1062:22)
at Function._load (node:internal/modules/cjs/loader:1211:37)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:171:5)
at node:internal/main/run_main_module:36:49 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Node.js v22.16.0
Edit: The worker.js file does actually exist on disk. Not sure what that means exactly.
Output:
[INFO 10:45:09 AM] [v1.24.7] Vitest extension is activated because Vitest is installed or there is a Vite/Vitest config file in the workspace.
[INFO 10:45:11 AM] [API] Resolving configs: [PROJECT_ROOT]/vite.config.ts
[INFO 10:45:16 AM] [TERMINAL] Initiated ws connection via ws://localhost:59841
[INFO 10:45:16 AM] [TERMINAL] Starting Vitest v3.2.3 ([PROJECT_ROOT]/vite.config.ts) in the terminal: node C:/Users/[USER]/.vscode/extensions/vitest.explorer-1.24.7/dist/worker.js;
[INFO 10:45:16 AM] [TERMINAL] Shell integration is not initiated, fallback to `terminal.sendText`.
[Error 10:45:23 AM] There were errors during config load.
[Error 10:45:23 AM] [Error Error] The extension could not connect to the terminal in 5 seconds. See the "vitest" terminal output for more details.
Error: The extension could not connect to the terminal in 5 seconds. See the "vitest" terminal output for more details.
at Timeout._onTimeout (c:\Users\[USER]\.vscode\extensions\vitest.explorer-1.24.7\dist\extension.js:13:4772)
at listOnTimeout (node:internal/timers:588:17)
at processTimers (node:internal/timers:523:7)
[Error 10:45:24 AM] [Error Error] The extension could not load any config.
Error: The extension could not load any config.
at Nl (c:\Users\[USER]\.vscode\extensions\vitest.explorer-1.24.7\dist\extension.js:13:11233)
at runNextTicks (node:internal/process/task_queues:65:5)
at processTimers (node:internal/timers:520:9)
at Li._defineTestProfiles (c:\Users\[USER]\.vscode\extensions\vitest.explorer-1.24.7\dist\extension.js:25:2314)
at Li.defineTestProfiles (c:\Users\[USER]\.vscode\extensions\vitest.explorer-1.24.7\dist\extension.js:25:1701)
at Li.activate (c:\Users\[USER]\.vscode\extensions\vitest.explorer-1.24.7\dist\extension.js:25:7158)
at VE (c:\Users\[USER]\.vscode\extensions\vitest.explorer-1.24.7\dist\extension.js:25:662)
at Wb.n (file:///c:/Users/[USER]/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:120:13382)
at Wb.m (file:///c:/Users/[USER]/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:120:13345)
at Wb.l (file:///c:/Users/[USER]/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:120:12801)
Also having this issue. Vitest extension is stuck at "resolving vitest workspace config". Reverting to extension version 1.24.3 fixed this for me.
Same as above, stuck at "resolving vitest workspace config" - also on macOS and using node.js 22.16.0.
Installing 1.24.3 resolved the issue, but debugging no longer works and it never attaches.
Only way to make the debugger work is to set vitest.shelltype to child process.
Same issue for me on Mac.
Downgrading to 1.24.3 resolved it.
My extension was stuck in "Resolving vitest..." on Windows.
Downgrading the extension to 1.24.3 fixed it for me.
The default is now child_process again (since v1.26.0). Thank you for your reports, I will take a closer look at this terminal integration.
@sheremet-va i just commented on another issue, but i think this is pretty much what I am encountering now. I am using the latest version as of 08/15 for both the extension and vscode. It seems to be forcing the directory it looks for the workspace in to C; my project is in F. I was able to mitigate this particular error by using a symlink, but have not found a vscode/vitest setting to point it to the correct directory.