Error on first start. TT #2020
-
I just cloned and executed "yarn run start". yarn run start VITE v3.2.4 ready in 690 ms ➜ Local: http://127.0.0.1:5173/ X [ERROR] Could not read from file: D:/Development/Project/MyProject/frontEnd/.yarn/virtual/@mui-icons-material-virtual-76ce175ae4/6/C:/Users/MyComputer/AppData/Local/Yarn/Berry/cache/@mui-icons-material-npm-5.10.14-021b4f0747-8.zip/node_modules/@mui/icons-material/esm/index.js X [ERROR] Could not read from file: D:/Development/Project/MyProject/frontEnd/.yarn/virtual/react-dom-virtual-22fafa95af/6/C:/Users/MyComputer/AppData/Local/Yarn/Berry/cache/react-dom-npm-18.2.0-dd675bca1c-8.zip/node_modules/react-dom/client.js X [ERROR] Could not read from file: D:/Development/Project/MyProject/frontEnd/.yarn/virtual/recoil-virtual-44fa142702/6/C:/Users/MyComputer/AppData/Local/Yarn/Berry/cache/recoil-npm-0.7.6-6f8de04e3d-8.zip/node_modules/recoil/es/index.js X [ERROR] Could not read from file: D:/Development/Project/MyProject/frontEnd/.yarn/virtual/react-router-dom-virtual-bf15a87266/6/C:/Users/MyComputer/AppData/Local/Yarn/Berry/cache/react-router-dom-npm-6.4.3-3b0e4f134b-8.zip/node_modules/react-router-dom/dist/index.js X [ERROR] Could not read from file: D:/Development/Project/MyProject/frontEnd/.yarn/virtual/@mui-material-virtual-4d8e2e947b/6/C:/Users/MyComputer/AppData/Local/Yarn/Berry/cache/@mui-material-npm-5.10.14-8d1f74b3b3-8.zip/node_modules/@mui/material/esm/index.js X [ERROR] Could not read from file: D:\Development\Project\MyProject\frontEnd.yarn_virtual_@firebase-auth-virtual-4f84b2703f\6\C:\Users\MyComputer\AppData\Local\Yarn\Berry\cache@firebase-auth-npm-0.20.11-4272f19deb-8.zip\node_modules@firebase\auth\dist\esm2017\index.js
X [ERROR] Could not read from file: D:\Development\Project\MyProject\frontEnd.yarn_virtual_@firebase-analytics-virtual-08607154d6\6\C:\Users\MyComputer\AppData\Local\Yarn\Berry\cache@firebase-analytics-npm-0.8.4-62ae89307a-8.zip\node_modules@firebase\analytics\dist\esm\index.esm2017.js
D:\Development\Project\MyProject\frontEnd.yarn\unplugged\esbuild-npm-0.15.14-0f40bc75be\node_modules\esbuild\lib\main.js:1566 Error: Build failed with 8 errors: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Following as I'm running into the same issue. |
Beta Was this translation helpful? Give feedback.
-
Hi guys, I got this directly from discord. You can disable global cache to prevent this from happening:
https://github.com/kriasoft/react-starter-kit/blob/main/.yarnrc.yml#L1 |
Beta Was this translation helpful? Give feedback.
Hi guys, I got this directly from discord.
koistya — 17/12/2022 01:49
@sawhighla there is an issue with ESBuild that Vite is using internally in dev mode that doesn't know how to load (Yarn) dependencies from different drives (e.g. when global cache is on C:/ but the project folder is on E:/.
You can disable global cache to prevent this from happening:
https://github.com/kriasoft/react-starter-kit/blob/main/.yarnrc.yml#L1