-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 --ui errors when run from PowerShell/cmd #1870
Comments
We temporarily close this due to the lack of enough information. |
Hi @antfu, the issue occurs with any repo which uses vitest, if you run the |
I had a similar issue. It turns out my shell had an environment variable called It's also possible to do something like |
@rodamaral interesting, although I'm fairly sure that's not the same issue. As you can see from the stacktrace, it seems like the issue stems from the drive letter in the path being It's worth noting that I do not get this issue in bash, only cmd and PowerShell. |
I have the same issue in Windows 11: "vite": "^4.1.4", Also made sure that I added I'm using Volta to manage node etc: https://volta.sh/
|
Do you use
The issue is that under the hood Vite seems to read the variable Instead of de-/restructuring, do an object assignment instead:
Hope this might help anyone. EDIT: I should add that this issue seems to regard Vite in general. I'm not sure how this translates to |
Thank you man! |
Cannot reproduce the error described in the issue on Windows 11. Both cmd and powershell work fine. |
Hello @alextompkins. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with |
Describe the bug
@vitest/ui seems unable to handle Windows absolute file paths. When running from PowerShell or cmd, we get the following error:
The problem does not occur when running the command via Git Bash, which uses synthesized unix-style file paths. As you can see from the stacktrace, it is trying to access a path with the drive letter of
undefined
.Reproduction
Any repo using:
"vite": ^3.0.4
"vitest": "^0.22.0"
"@vitest/ui": "^0.22.0"
and running on Windows.
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: