You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have reviewed the historical issues, and issue #329 appears to be similar. I have provided the minimal reproducible code for reference.
In my case, when Inspect is configured in vite.config.ts, vitest vscode fails to run and start properly. The error message in the bottom right corner states, "There was an error during Vitest startup. Check the output for more details."
However, when Inspect is commented out, vitest vscode works fine.
I have also tried adding content to the exclude directories, but it was unsuccessful.
**the vitest oupput**
[INFO 19:59:01] [v1.8.5] Vitest extension is activated because Vitest is installed or there is a Vite/Vitest config file in the workspace.
[INFO 19:59:01] [API] Running Vitest v2.1.8 (vitest-dev-vscode-issue/vitest.config.ts) with Node.js@: C:\ToolPortable\Nodejs\nodejs\node.EXE
[Error 19:59:03] [Error Error] Vitest failed to start:
TypeError: Cannot convert undefined or null to object
at Function.values (<anonymous>)
at configureServer (file:///C:/Desktop/vitest-dev-vscode-issue/node_modules/.pnpm/[email protected][email protected][email protected]_@[email protected]_/node_modules/vite-plugin-inspect/dist/shared/vite-plugin-inspect.UaceC5Dq.mjs:1408:12)
at configureServer (file:///C:/Desktop/vitest-dev-vscode-issue/node_modules/.pnpm/[email protected][email protected][email protected]_@[email protected]_/node_modules/vite-plugin-inspect/dist/shared/vite-plugin-inspect.UaceC5Dq.mjs:1494:19)
at _createServer (file:///C:/Desktop/vitest-dev-vscode-issue/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:63080:26)
at async createViteServer (file:///C:/Desktop/vitest-dev-vscode-issue/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/vitest/dist/chunks/cli-api.C2yC_ESk.js:9822:18)
at async Module.createVitest (file:///C:/Desktop/vitest-dev-vscode-issue/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/vitest/dist/chunks/cli-api.C2yC_ESk.js:11441:18)
at async Po (C:\Users\test\.vscode\extensions\vitest.explorer-1.8.5\dist\worker.js:21:8420)
at async process.e (C:\Users\test\.vscode\extensions\vitest.explorer-1.8.5\dist\worker.js:21:9978)
Error: Vitest failed to start:
TypeError: Cannot convert undefined or null to object
at Function.values (<anonymous>)
at configureServer (file:///C:/Desktop/vitest-dev-vscode-issue/node_modules/.pnpm/[email protected][email protected][email protected]_@[email protected]_/node_modules/vite-plugin-inspect/dist/shared/vite-plugin-inspect.UaceC5Dq.mjs:1408:12)
at configureServer (file:///C:/Desktop/vitest-dev-vscode-issue/node_modules/.pnpm/[email protected][email protected][email protected]_@[email protected]_/node_modules/vite-plugin-inspect/dist/shared/vite-plugin-inspect.UaceC5Dq.mjs:1494:19)
at _createServer (file:///C:/Desktop/vitest-dev-vscode-issue/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:63080:26)
at async createViteServer (file:///C:/Desktop/vitest-dev-vscode-issue/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/vitest/dist/chunks/cli-api.C2yC_ESk.js:9822:18)
at async Module.createVitest (file:///C:/Desktop/vitest-dev-vscode-issue/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/vitest/dist/chunks/cli-api.C2yC_ESk.js:11441:18)
at async Po (C:\Users\test\.vscode\extensions\vitest.explorer-1.8.5\dist\worker.js:21:8420)
at async process.e (C:\Users\test\.vscode\extensions\vitest.explorer-1.8.5\dist\worker.js:21:9978)
at ChildProcess.p (C:\Users\test\.vscode\extensions\vitest.explorer-1.8.5\dist\extension.js:20:3607)
at ChildProcess.emit (node:events:518:28)
at emit (node:internal/child_process:950:14)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
### Extension Version
1.8.5
### Vitest Version
2.1.8
### Validations
- [X] Check that you are using the latest version of the extension
- [X] Check that there isn't [already an issue](https://github.com/vitest-dev/vscode/issues) 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](https://github.com/vitest-dev/vscode/discussions) or join our [Discord Chat Server](https://chat.vitest.dev).
- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.
The text was updated successfully, but these errors were encountered:
Describe the bug
After
pnpm i
open the vscode editorI have reviewed the historical issues, and issue #329 appears to be similar. I have provided the minimal reproducible code for reference.
In my case, when
Inspect
is configured invite.config.ts
,vitest vscode
fails to run and start properly. The error message in the bottom right corner states, "There was an error during Vitest startup. Check the output for more details."However, when
Inspect
is commented out,vitest vscode
works fine.I have also tried adding content to the exclude directories, but it was unsuccessful.
Reproduction
repo:https://github.com/jiaopengzi/vitest-dev-vscode-issue
Output
The text was updated successfully, but these errors were encountered: