I followed your instructions and didn’t get the same error, but I understand what you meant.
Feel free to tell me if I did something diffent.
Vite.js in TypeScript example repo from gitHubdashboard and shared-theme folders from gitHub and pasted them into the src folderHere is solution
dashboard and shared-theme folders.Dashboard into main.tsximport App from "./dashboard/Dashboard";
And it worked! So you need to remove all .js files.