I didn't know Vite 7.0 just released, and I used vite@latest to initiate my React project --> should never do this again! ALWAYS check recent releases and use the stable version.
I was about to re-initiate the project using Vite 6.0 until I realized that there is a way to override the dependencies.
rozsazoltan Thank you!