This guide covers common issues you might encounter while developing OOOC Fête Finder and their solutions.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/KingPsychopath/oooc-fete-finder/llms.txt
Use this file to discover all available pages before exploring further.
Environment Issues
Missing DATABASE_URL
Error: DATABASE_URL is required
Error: DATABASE_URL is required
DATABASE_URL to your .env.local:POSTGRES_URL as an alias:Missing AUTH_SECRET
Error: AUTH_SECRET must be at least 32 characters
Error: AUTH_SECRET must be at least 32 characters
- Admin login fails
- Token generation errors
- Rate limiting breaks
.env.local:DATA_MODE not set
Error: DATA_MODE is required in production
Error: DATA_MODE is required in production
DATA_MODE in your environment:remote: Use Postgres event store with CSV fallback (production)local: Development mode (not recommended for production)
DATA_MODE=remote in production deployments to prevent misconfiguration.Database Issues
Connection timeout
Error: Connection timeout / ECONNREFUSED
Error: Connection timeout / ECONNREFUSED
- Postgres is not running
- Wrong host/port in
DATABASE_URL - Network firewall blocking connection
- Postgres not accepting remote connections
Table does not exist
Error: relation app_kv_store does not exist
Error: relation app_kv_store does not exist
app_kv_storeapp_event_store_columnsapp_event_store_rowsapp_event_store_metaapp_event_store_settings
Row count mismatch
Warning: Row counts don't match
Warning: Row counts don't match
pnpm db:cli -- rows:- Partial import failure
- Manual database modifications
- Interrupted save operation
Build Issues
Module not found
Error: Module not found: Can't resolve '@/...'
Error: Module not found: Can't resolve '@/...'
Type errors
Build fails with TypeScript errors
Build fails with TypeScript errors
- Update type definitions:
pnpm add -D @types/node @types/react - Restart TypeScript server in VS Code: Cmd+Shift+P → “TypeScript: Restart TS Server”
- Check for version mismatches between
reactand@types/react
Out of memory
Error: JavaScript heap out of memory
Error: JavaScript heap out of memory
.env:Testing Issues
Tests fail with environment errors
Error: Environment variable not defined
Error: Environment variable not defined
test/setup-env.ts is configured in vitest.config.ts:Mock not working
Error: Mocked module returns real implementation
Error: Mocked module returns real implementation
Coverage not generated
Error: Coverage directory is empty
Error: Coverage directory is empty
pnpm test:coverage doesn’t generate HTML reports.Solutions:1. Verify coverage config:coverage/index.html in project root.Runtime Issues
Admin login fails
Admin login returns 401 Unauthorized
Admin login returns 401 Unauthorized
Rate limit errors
Error: 429 Too Many Requests
Error: 429 Too Many Requests
POST /api/auth/verify: 60/min per IP, 6/15min per email+IPPOST /api/event-submissions: 20/10min per IP, 5/60min per email+IPPOST /api/track: Rate limited per IP
Retry-After header for seconds until reset.2. Clean up test counters:Featured events not showing
Featured events don't appear on homepage
Featured events don't appear on homepage
- Legacy
Featuredcolumn used (now deprecated) - Schedule entries not created
- Effective times are in the past
/admin → Featured Events Manager → “Feature now”3. Verify schedule:
Check app_featured_event_schedule table for active entries with:status = 'scheduled'effective_start_at <= NOW()effective_end_at >= NOW()
CSV import fails
Error: CSV structure mismatch
Error: CSV structure mismatch
- Import fails with row count errors
- Events missing after import
- Columns misaligned
- Unquoted commas: Wrap cells with commas in double quotes
- Line breaks in cells: Use quoted strings:
"Line 1\nLine 2" - Stray quotes: Escape with double quotes:
"She said ""hello"""
- Check for extra columns at the end
- Remove trailing commas
- Verify header row is row 1
Geocoding not working
Map shows default location instead of event location
Map shows default location instead of event location
GOOGLE_MAPS_API_KEYnot set- Geocoding API not enabled in Google Cloud Console
- Coordinate cache not warmed
maps:locations:v1 KV key.4. Check cache status:Development Workflow Issues
Hot reload not working
Changes not reflected in browser
Changes not reflected in browser
--turbopack flag:Biome formatting conflicts
Files keep getting reformatted
Files keep getting reformatted
Deployment Issues
Build succeeds locally but fails in Vercel
Error: Build fails in Vercel but works locally
Error: Build fails in Vercel but works locally
- Environment variables not set in Vercel
- Node version mismatch
- Build cache issues
AUTH_SECRETDATABASE_URLDATA_MODE=remote
.node-version or package.json engines field.3. Clear build cache:
Vercel Dashboard → Deployments → ⋮ → Redeploy → Clear cachePost-deploy stale data
New deployment shows old events
New deployment shows old events
- Live events reload from Postgres
- Homepage revalidation
- Fresh ISR cache
Getting Help
If you encounter an issue not covered here:-
Check logs:
- Development: Console output from
pnpm dev - Production: Vercel deployment logs
- Database:
pnpm health:check
- Development: Console output from
-
Run diagnostics:
- Review documentation:
- Check source code: Many scripts have detailed inline comments explaining behavior.
- Report issues: If you find a bug, document the error message, steps to reproduce, and environment details.