Try to update your vite version in package.json. I had version 5+. After update to 6+ the issue has been resolved