-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Cannot run when yarn uses global cache as repository and the project and cache are in different drives #15801
Comments
Hello @andre-rafa-b. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with |
Hi, created reproduction here: mcenkar/vite-15801 Just simple starter project from https://vitejs.dev/guide/#scaffolding-your-first-vite-project
Also in my case it doesn't need to be separate disk, I have project and cache on same disk and get mentioned error. |
Hi @sapphi-red, it's not actually even cross-drive link, even same drive doesn't work. Basically for me there is no way to enable global cache and I had to completely disable it in global settings. IMHO if there was workaround this could be ignored, but right now it totally breaks global cache, and only way is to use So I would appreciate if you could rethink if this is really won't fix. And judging by number of duplicates it affects a lot of users. If this is really won't fix then perhaps warning for users is better, as right now they just see error, investigate, and file yet another duplicate. |
@mcenkar Sorry I totally overlooked your comment. I've tried on my Windows machine and I wasn't able to reproduce. Would you create a new issue with more details? (e.g. OS, where the global cache is located) |
@mcenkar in my case indeed the error was caused by cross drive link. I can't recommend vite for the rest of the team by now. I hope vite can support this kind of environment soon. Thanks for the replies |
Describe the bug
I use yarn in plug n play mode where the modules are stored in a global cache like C:...AppData...Local\Yarn.
I just create a project which uses yarn + vite + react. The project is located at D:\Projects.
When I run yarn run dev I got an error "Could not read from file .... react-dom/client.js"
I tried to move the cache to C:.yarn-cache without luck but it worked when I moved to D:.yarn-cache.
I had other react projects working fine using webpack and it's my first time using Vite.
Reproduction
#15801 (comment)
Steps to reproduce
No response
System Info
Used Package Manager
yarn
Logs
Could not read from file: D:/Desenvolvimento/Estudos/React/vite/.yarn/virtual/react-dom-virtual-91a0a8ad3c/6/C:/Users/andre/AppData/Local/Yarn/Berry/cache/react-dom-npm-18.2.0-dd675bca1c-10c0.zip/node_modules/react-dom/client.js
Validations
The text was updated successfully, but these errors were encountered: