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 VSCode fails to start without a Vitest config file #380

Closed
4 tasks done
MangelMaxime opened this issue May 10, 2024 · 2 comments
Closed
4 tasks done

Vitest VSCode fails to start without a Vitest config file #380

MangelMaxime opened this issue May 10, 2024 · 2 comments

Comments

@MangelMaxime
Copy link

Describe the bug

Vitest VSCode fails to start without a Vitest config file.

I am pretty sure in the past it was able to start without a config file. Also I found #348 mentioning the same issue and having a fix provided for it. So perhaps this is a regression.

Reproduction

Open a repository without a Vitest config file.

Output

[INFO 20:27:00] [v0.10.2] Vitest extension is activated because Vitest is installed or there is a Vite/Vitest config file in the workspace.
[Error 20:27:00] [API] Failed to start Vitest: No vitest config files found

Version

v0.10.2

Validations

@sheremet-va
Copy link
Member

The extension expects either the config or a script in package.json that starts with vitest. Starting Vitest for any project seems excessive. What if you have vitest installed globally?

@MangelMaxime
Copy link
Author

What if you have vitest installed globally?

I would say this is a bad practice 😝

More seriously, I understand the reason behind the decision you are describing. Perhaps the log can be changed to explain the situation / requirements or make these requirements documented somewhere?

If they are sorry I was not able to find it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants