Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vitest fails to start if a compiled config is available #422

Closed
4 tasks done
bennycode opened this issue Jun 27, 2024 · 0 comments · Fixed by #424
Closed
4 tasks done

Vitest fails to start if a compiled config is available #422

bennycode opened this issue Jun 27, 2024 · 0 comments · Fixed by #424
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)

Comments

@bennycode
Copy link

Describe the bug

The Vitest VS Code extension fails to start when a compiled Vitest config is available.

Reproduction

  1. Put a Vitest TypeScript config (vitest.config.ts) in the root of your project
  2. Compile the config using tsc so that a dist/vitest.config.d.ts file is being created
  3. Reload the VS Code window to see if the VS code extension can be initialized (it will crash)

Current workaround: Deleting the dist/vitest.config.d.ts file and reloading the VS code window resolves the issue.

Output

[INFO 1:12:50 PM] [v0.12.3] Vitest extension is activated because Vitest is installed or there is a Vite/Vitest config file in the workspace.
[INFO 1:12:51 PM] [API] Running Vitest v1.6.0 (dist/vitest.config.js) with Node.js: /home/bennycode/.nvm/versions/node/v20.10.0/bin/node
[INFO 1:12:51 PM] [API] Running Vitest v1.6.0 (dist/vitest.config.d.ts) with Node.js: /home/bennycode/.nvm/versions/node/v20.10.0/bin/node
[INFO 1:12:51 PM] [API] Running Vitest v1.6.0 (trading212-api/vitest.config.ts) with Node.js: /home/bennycode/.nvm/versions/node/v20.10.0/bin/node
[INFO 1:12:52 PM] [API] Vitest v1.6.0 (dist/vitest.config.js) process 25764 created
[INFO 1:12:52 PM] [API] Vitest v1.6.0 (trading212-api/vitest.config.ts) process 25771 created
[Worker] failed to load config from /home/bennycode/dev/bennycode/trading212-api/dist/vitest.config.d.ts
[Error 1:12:52 PM] [Error Error] Vitest failed to start: 
Error: Vitest failed to start: 
	at ChildProcess.f (/home/bennycode/.vscode-server/extensions/vitest.explorer-0.12.3/dist/extension.js:18:5392)
	at ChildProcess.emit (node:events:518:28)
	at emit (node:internal/child_process:951:14)
	at process.processTicksAndRejections (node:internal/process/task_queues:83:21)

Version

v0.12.3

Validations

@sheremet-va sheremet-va added p3-minor-bug An edge case that only affects very specific usage (priority) and removed pending triage labels Jun 27, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jul 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants