This page covers the most common issues developers encounter when setting up, developing, and deploying Kit. Questions are organized by category — expand any item to see the root cause and fix.
Installation & Setup pnpm install shows peer dependency warnings Missing .env.local — app crashes on startup Wrong Node.js version — build fails TypeScript errors after fresh installDatabase Connection refused — Cannot connect to PostgreSQL PgBouncer error — prepared statement already exists (42P05) Migration fails — database drift detected Connection pool exhausted in serverless Schema drift between local and productionAuthentication 401 Unauthorized — Clerk keys not working Clerk webhook not firing — users not created in database Redirect loop on login page User signed in but not found in databasePayments Webhook signature verification failed Variant ID mismatch — checkout fails Test mode charges appearing as real Active subscription but features locked Customer portal URL expired or not workingAI Integration AI provider returns 401 — invalid API key 402 Payment Required — insufficient credits Streaming response times out after 30 seconds RAG returns empty sources — no context found Credits not deducting after AI requestsBuild & TypeScript Production crash: 'No QueryClient set' after adding @tanstack/react-query to optimizePackageImports Module not found — cannot resolve '@/lib/...' Bundle size exceeds 200 KB target Hydration mismatch errors in developmentDeployment Environment variables not available in production Cron jobs not running in production CORS errors — blocked by Cross-Origin policy Serverless function timeout on Vercel