Troubleshooting
Common issues and quick fixes when running or building the template.
Blank screen after build
Ensure your index.html contains a mount point:
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>-
Check that the build output folder (
/dist) includes all JS and CSS bundles. -
If deploying to a subpath (e.g.
/travel-app/), updatebaseinvite.config.ts:export default defineConfig({ base: '/travel-app/' })
Tailwind styles missing
-
Confirm Tailwind CSS v4.1 is installed and imported at the top of your
index.css:@import "tailwindcss"; -
Verify the
contentpaths include all components:content: ["./src/**/*.{ts,tsx}"] -
If you’re using VSCode, restart the language server after editing the config.
-
Make sure custom layers (
@layer base,@layer utilities) aren’t commented out.
Dark/Light mode not toggling
-
The theme toggle depends on
ThemeProvideranduseThemehook. Check that your app is wrapped with:<ThemeProvider defaultTheme="light"> <App /> </ThemeProvider> -
Ensure
.darkclass exists on the<html>element and CSS includes:@custom-variant dark (&:is(.dark *));
Router or 404 issues
-
The app uses React Router v7. Confirm all routes are declared in
src/routes/index.tsx. -
For static hosting (e.g. Vercel, Netlify), enable fallback to
index.html:-
Vercel: add
"cleanUrls": trueinvercel.json -
Netlify: use a
_redirectsfile/* /index.html 200
-
TypeScript or ESLint errors
-
Run:
yarn lintto surface typing or syntax issues.
-
If TypeScript definitions aren’t found:
yarn tsc --noEmit -
Clear cache if strange errors persist:
rm -rf node_modules .turbo dist && yarn install
Images not loading
- Paths in mock data (e.g.
/images/hotel-1.jpg) are relative to the public folder. Make sure images exist under/public/images/. - When deploying, confirm all static assets are copied to
/dist.
Slow build or dev server
-
Delete
.viteordistcache folders before re-running:rm -rf .vite dist -
Check Node.js version (
≥ 18recommended). -
Disable heavy lint plugins when building for production if needed.
💡 If you’re still stuck, rebuild from a clean install:
rm -rf node_modules && yarn install && yarn devIt resolves 90% of environment-related issues.