Start with pnpm doctor --check: most problems are a missing or wrong environment value, and the doctor names it.
Install and startup
pnpm install fails or uses the wrong pnpm
Run corepack enable so the pinned pnpm 10.4.1 is used, and check node -v is 24 or newer.
Electron failed to install correctly (Linux)
pnpm skipped the binary download. Run node node_modules/electron/install.js from the repository root.
Strange type or runtime errors after upgrading dependencies
The workspace uses node-linker=hoisted, and a major upgrade can leave an old copy nested inside another package. Reinstall cleanly: rm -rf node_modules apps/*/node_modules packages/*/node_modules && pnpm install, then check the resolved version with node -p "require('<pkg>/package.json').version".
pnpm dev fails on the backend task
pnpm dev also starts the Python service when apps/backend exists, which needs Python 3.12 and uv. Install them, or run only the web app: pnpm --dir apps/web dev.
Invalid server environment and the server exits
Production mode refuses to start with missing or weak values. The message lists each one, for example BETTER_AUTH_SECRET must be at least 32 characters. Fix them or run pnpm doctor.
Docker Compose: required variable BETTER_AUTH_SECRET is missing
Compose needs a .env next to docker-compose.yml with BETTER_AUTH_SECRET (and BACKEND_HMAC_SECRET with the AI Agents module), even to start only Postgres.
Database
@prisma/client did not initialize yet or missing generated types
Run pnpm generate, then restart the dev server and the TypeScript server.
pnpm migrate migrated the wrong database
The Prisma CLI reads packages/database/.env, the app reads apps/web/.env. pnpm doctor --check warns when they differ.
pnpm migrate wants to reset the database
The database has drifted from the migration history. Never accept the reset on a database you care about. Point packages/database/.env at a fresh database or resolve the drift with prisma migrate diff.
type "vector" does not exist
The AI Agents migrations need pgvector. Use Neon, Supabase, or the pgvector/pgvector Docker image.
Landing Page config not found in Postgres for name: …
No landing page row has a title equal to NEXT_PUBLIC_SAAS_NAME. Run pnpm seed, or make the name match the seeded one.
Content
Docs sidebar or landing page does not show a change
Content is cached in Redis for an hour. Admin edits clear it; direct database edits do not. Delete <name>-documentation:v1 or <name>-landing-page:cms:v1 (<name> is the lowercase product name) or wait.
Invalid src prop … hostname is not configured under images
An image URL points at a host missing from images.remotePatterns in apps/web/next.config.mjs. Add your Blob, R2 or CDN host.
Admin → Docs says editing is only available for Postgres
The docs editor needs NEXT_PUBLIC_CMS="postgres". With constant, edit the MDX files.
Authentication
Signed in, but sent back to /landing
The session cookie is missing. Check that NEXT_PUBLIC_URL matches the URL in the browser (localhost and 127.0.0.1 are different sites), and that you did not rename NEXT_PUBLIC_SAAS_NAME (it changes the cookie name).
No verification email
Without an email client the link is printed in the server log (outside production). With Resend, check the sending domain is verified and NEXT_PUBLIC_SUPPORT_MAIL is on it; the Resend dashboard shows each attempt.
redirect_uri_mismatch from an OAuth provider
Register <NEXT_PUBLIC_URL>/api/auth/callback/<provider> exactly, with the right scheme and no trailing slash.
"Sign-ups are invite-only" Registration is set to Invite only in Admin → Users. Send an invitation or switch it to Open.
"This is a read-only demo account"
You are signed in as the guest role. Sign out and use a normal account.
API and uploads
429 Rate limit exceeded
Session routes allow 5 requests per minute per user by default. Change the limiter in apps/web/server/ratelimit.ts or the route's rateLimit in the route policy.
413 Payload too large
The request is larger than the route's maxBodyBytes. Raise it in apps/web/lib/route-policy.ts if that is intended, and in your proxy too.
Uploads fail with a Redis or Upstash error
Rate-limited routes need Upstash. Set UPSTASH_REDIS_REST_URL and UPSTASH_REDIS_REST_TOKEN.
routePolicy.test.ts fails after adding an API route
Add the route's row to route-policy.ts, call guardRoute from session routes, and validate input the way the row declares.
apiRegistry.test.ts fails
A procedure was added or renamed without updating apps/web/trpc/apiRegistry.ts.
Payments
Paid, but no credits
Look at the webhook delivery log in Stripe or Dodo. 400 means a wrong signing secret; timeouts mean the URL is not reachable (use stripe listen or a tunnel locally). Check the server log for [Stripe Webhook] or [Dodo Webhook] lines.
Dodo rejects the API key
The key's mode (test or live) must match DODO_PAYMENTS_ENVIRONMENT.
AI
"AI is disabled" or "No AI provider credentials are configured"
Set NEXT_PUBLIC_AI_ENABLED=true and at least one provider key.
"AI provider is not configured: openai" The active prompt version uses a provider you have no key for. Change its provider and model in Admin → AI.
"Not enough credits."
The user's balance is below 1. Buy credits, or raise creditsTotal for testing.
Agent calls fail with connection refused or 401
pnpm dev runs the Python API on port 8400: set BACKEND_URL=http://localhost:8400. A 401 means BACKEND_HMAC_SECRET differs between apps/web/.env and apps/backend/.env.
Desktop and mobile
Desktop shows errors or cannot sign in
Check VITE_API_URL points at a running web app, and that the web app's CORS list includes the renderer's origin.
Mobile app on a phone cannot reach the API
localhost on a phone is the phone. Use your computer's LAN IP or a tunnel in EXPO_PUBLIC_API_URL.
Template workflow (open-source repository)
template:check-sync fails
It prints the source path and a diff for each drifted file. Run pnpm template:sync. If it reports generated artifacts, delete node_modules, .next or .turbo inside templates/saas-boilerplate. New starter-only files must be registered in templateOverrides.
Still stuck?
Search or open an issue on GitHub. Include what you ran, the full error, your Node.js and pnpm versions, pnpm doctor --check output (secrets are masked), and for downloads your .boilerplate-version and modules.
