-
-
Notifications
You must be signed in to change notification settings - Fork 6.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
Tests don't run on Windows without admin privileges #7390
Comments
This is caused because |
Thanks for the links @sapphi-red. Do you think this is fixable on Vite's end, or should we document this edge case for Windows? |
I think it is not fixable. It seems if you turn on developer mode, it allows you to create symlinks without being an admin.
|
I can confirm that activating Developer Mode fixed the issue for me. Thanks for sharing this tip! Is it feasible to detect this issue when running the tests and providing guidance and a link to the Windows documentation when it happens? If you could give me some hints for where to start looking, I might have a go at that. In the meantime, I can open a PR that adds a notice to the documentation. |
The error is happening here, so I think it is possible to catch it here. vite/scripts/jestGlobalSetup.cjs Line 24 in fedb106
|
@sapphi-red Thanks a lot for the pointer to the code! It was surprisingly easy with your help. |
Describe the bug
When I try to run the tests, I get a crash because a symlink cannot be created.
I can get around this by opening VSCode with admin privileges (in the startup menu, search for "VSCode", right-click, and run as admin). Some of the tests do still fail, but it's only 4 out of 465.1
It is possible that I have not set up my development environment correctly. I'm running Git Bash (MINGW64) in VSCode as my terminal, but I get the same error in Cmd (if I run Cmd as an admin, it works).
Reproduction
https://github.com/vitejs/vite
System Info
Used Package Manager
pnpm
Logs
No response
Validations
Footnotes
Failed tests:
↩The text was updated successfully, but these errors were encountered: