Clear Cache and Rebuild:
Sometimes, cache issues can cause Vite to think the file still exists. Try clearing the cache and rebuilding your project:
rm -rf node_modules rm -rf dist npm install npm run dev