- Add POST /admin/users endpoint with password hashing and role support - Add user creation dialog to admin users page - Migrate web from Next.js to Vite + TanStack Router - Fix Dialog component positioning for Tailwind CSS v4 - Add @source directive for @sase/ui package scanning - Add pl24 integration parsers and vehicle decode flow - Backup old Next.js app to apps/web-nj Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1.8 KiB
1.8 KiB
TanStack Router - Common Errors & Solutions
Error 1: Devtools Dependency Not Found
Symptom: Build error: Cannot find module '@tanstack/router-devtools-core'
Solution:
npm install @tanstack/router-devtools
Error 2: Routes Not Auto-Generated
Symptom: routeTree.gen.ts not created, type errors
Solution: Vite plugin MUST come before react():
// vite.config.ts
plugins: [
TanStackRouterVite(), // First!
react(),
]
Error 3: Link to Not Typed
Symptom: No autocomplete for routes
Solution: Import and use the generated routeTree:
import { routeTree } from './routeTree.gen'
const router = createRouter({ routeTree })
Error 4: Loader Not Running
Symptom: Data not loaded on navigation
Solution: Ensure route exports Route:
export const Route = createFileRoute('/path')({
loader: async () => { /* ... */ }
})
Error 5: Memory Leak with TanStack Form
Symptom: Production crashes every 30min when using forms
Issue: GitHub #5734 (open)
Workaround: Use React Hook Form instead, or avoid TanStack Form until fixed
Error 6: Middleware Undefined in Vite Build
Symptom: Build works in dev, fails in production
Solution: Check Vite plugin configuration and bundling settings
Error 7: API Route Loaders Fail After Restart
Symptom: Loaders return stale data or error after dev server restart
Solution: Clear browser cache, or add cache-busting to loader queries
Prevention Tips
- Always use TanStackRouterVite plugin
- Keep devtools as dev dependency
- Include all route state in query keys
- Test production builds locally
- Use TypeScript strict mode