Skip to Content
Found it useful? Support us with a 5 ⭐ review on ThemeForest!
Troubleshooting

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/), update base in vite.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 content paths 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 ThemeProvider and useTheme hook. Check that your app is wrapped with:

    <ThemeProvider defaultTheme="light"> <App /> </ThemeProvider>
  • Ensure .dark class 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": true in vercel.json

    • Netlify: use a _redirects file

      /* /index.html 200

TypeScript or ESLint errors

  • Run:

    yarn lint

    to 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 .vite or dist cache folders before re-running:

    rm -rf .vite dist
  • Check Node.js version (≥ 18 recommended).

  • 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 dev

It resolves 90% of environment-related issues.

Last updated on