Troubleshooting

🇮🇩 Bahasa Indonesia

Start-up

Symptom Cause and fix
Missing required settings: … from pnpm dev .env missing or incomplete: copy .env.example, fill DATABASE_URL and the Clerk keys
White page, console says VITE_CLERK_PUBLISHABLE_KEY is missing The web app reads it at build/start time: set it, then restart pnpm dev or rebuild
PORT environment variable is required Each app needs PORT (and the web app BASE_PATH=/). pnpm dev and Replit set them; set them yourself for manual builds
relation "…" does not exist Tables not created: pnpm db:push (on the right database)
pnpm install stops with ERR_PNPM_IGNORED_BUILDS pnpm 10+ blocks install scripts by default; the workspace already allows esbuild in pnpm-workspace.yaml (allowBuilds). Add any other package it names there
Build or tests fail with Invalid or unexpected token in esbuild Platform binaries missing (an old lockfile from a Linux-only setup). Delete node_modules and run pnpm install

Sign-in

Symptom Fix
Sign-in loops or “invalid publishable key” in production Production uses Clerk live keys and VITE_CLERK_PROXY_URL=https://<domain>/api/__clerk; the domain must be the one configured in Clerk’s production instance. Rebuild after changing VITE_*
I signed in but there’s no Creator link Your email isn’t in LEARNING_CONTENT_ADMIN_EMAILS / PLATFORM_ADMIN_EMAILS, or it isn’t verified in Clerk. Restart the API after changing the variables
An admin can’t be demoted They are a bootstrap admin from PLATFORM_ADMIN_EMAILS: remove them there

Payments

Symptom Fix
Buy button says “Payments are not set up yet” MIDTRANS_SERVER_KEY not set for this environment (published deployments have their own secrets)
Paid in Midtrans but the pass isn’t active Midtrans couldn’t reach /api/payments/midtrans/notifications: LEARNING_PASS_PUBLIC_URL must be the public https address, not localhost. The reconciliation job re-checks pending payments every 10 minutes anyway
“401 Unauthorized” from Midtrans Sandbox key with MIDTRANS_IS_PRODUCTION=true, or the other way round
Promo code refused learningPass.promoCode is empty in site.config.ts, or a different code

Email

Symptom Fix
No emails at all RESEND_FROM_EMAIL not set (/api/config/features shows email:false)
Resend rejected the email (HTTP 403) Sender domain not verified in Resend, or using resend.dev
Emails only fail outside Replit No RESEND_API_KEY: the code then tries the Replit connector, which only exists in a Repl
Webinar reminders or announcements arrive late The API was asleep (Replit Autoscale). Use a Reserved VM / always-on process

Discord

Symptom Fix
Community page says Discord isn’t set up One of the six DISCORD_* variables is missing, or DISCORD_REDIRECT_URI isn’t https / doesn’t end in /api/community/discord/callback
Linked, but no role Roles only change in production (NODE_ENV=production); the bot needs Manage Roles and its role must be above the member role

Uploads

Symptom Fix
“Upload not available” No PRIVATE_OBJECT_DIR: create a bucket in Replit Tools → App Storage. Outside Replit uploads aren’t supported; use links
Uploaded video doesn’t play Lessons with a YouTube link always show YouTube; remove the link to play the upload. MP4 must be H.264/AAC, max 100 MB

Text and languages

Symptom Fix
A word shows as course.something That key is missing from both locale files: add it (pnpm run typecheck lists missing keys)
Old logo still shows Bump logo.version in site.config.ts
Language switch doesn’t stick The browser blocks localStorage (private mode); the site falls back to defaultLocale

Still stuck? Run pnpm check (with the test database from 07) and read the API log (LOG_LEVEL=debug for more detail).