Installation Issues
Bun install fails
Symptoms:
error: failed to download dependencySolutions:
- Check internet connection
- Clear Bun cache:
rm -rf ~/.bun/install/cache bun install - Try with verbose logging:
bun install --verbose - Check if firewall/proxy is blocking downloads
Postinstall script fails
Symptoms:
error: postinstall script failed
Error: Prisma schema not foundSolutions:
- Navigate to db package and generate manually:
cd packages/db bunx prisma generate cd ../.. - Verify
packages/db/prisma/schema.prismaexists - Check Prisma version compatibility:
bunx prisma --version
Docker Issues
Docker services won’t start
Symptoms:
- Containers immediately exit
docker psshows no containers- Error: “port already allocated”
Solutions:
Port conflicts:
# Check what's using the ports
lsof -i :5433 # PostgreSQL
lsof -i :6379 # Redis
lsof -i :9000 # MinIO
# Kill conflicting process
kill -9 [PID]
# Or change ports in docker-compose.dev.ymlDocker not running:
- Start Docker Desktop
- Wait for “Docker Desktop is running” message
- Try again:
bun run docker:dev
Insufficient resources:
- Open Docker Desktop settings
- Increase resources:
- RAM: 6-8 GB minimum
- Disk: 20 GB minimum
- Apply & restart Docker
Corrupted volumes:
# Nuclear option: remove everything
bun run docker:clean
# Restart fresh
bun run docker:devDocker containers keep restarting
Symptoms:
docker ps
# Shows "Restarting (1) X seconds ago"Solutions:
Check logs:
docker compose -f docker/docker-compose.dev.yml logs [service-name]
# Examples:
docker compose -f docker/docker-compose.dev.yml logs postgres-dev
docker compose -f docker/docker-compose.dev.yml logs redis-devPostgreSQL issues:
# Remove volume and restart
docker volume rm zephyr-dev-postgres-data
bun run docker:devPermission issues (Linux):
# Fix Docker permissions
sudo usermod -aG docker $USER
newgrp dockerCan’t access Docker services from host
Symptoms:
- Can’t connect to
localhost:5433(PostgreSQL) - Can’t access
localhost:9001(MinIO Console)
Solutions:
Check port forwarding:
docker ps
# Verify PORTS column shows "0.0.0.0:5433->5432"Use host networking (Linux only):
# In docker-compose.dev.yml
network_mode: "host"Check firewall:
# macOS
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --list
# Linux
sudo ufw statusDatabase Issues
Prisma client not generated
Symptoms:
Error: Cannot find module '@prisma/client'Solutions:
# Generate Prisma client
cd packages/db
bunx prisma generate
# Or use npm script
cd ../..
bun run db:upDatabase schema out of sync
Symptoms:
P2021: The table `public.users` does not existSolutions:
# Push schema to database
bun run db:up
# Or manually:
cd packages/db
bunx prisma db pushMigration fails
Symptoms:
Error: P1001: Can't reach database serverSolutions:
-
Check database is running:
docker ps | grep postgres -
Test connection:
docker exec -it zephyr-dev-postgres pg_isready -U postgres -
Check connection string:
- Verify
DATABASE_URLin.env - Default:
postgresql://postgres:postgres@localhost:5433/zephyr
- Verify
-
Reset database:
# WARNING: Deletes all data docker volume rm zephyr-dev-postgres-data bun run docker:dev bun run db:up
Prisma Studio won’t open
Symptoms:
- http://localhost:5555 doesn’t load
- “Connection refused” error
Solutions:
-
Check container is running:
docker ps | grep prisma-studio -
Restart Prisma Studio:
docker compose -f docker/docker-compose.dev.yml restart prisma-studio -
Check logs:
docker compose -f docker/docker-compose.dev.yml logs prisma-studio -
Run locally instead:
cd packages/db bunx prisma studio
Application Issues
Apps won’t start
Symptoms:
Error: EADDRINUSE: address already in use :::3000Solutions:
Port already in use:
# Find process using the port
lsof -i :3000 # macOS/Linux
netstat -ano | findstr :3000 # Windows
# Kill the process
kill -9 [PID] # macOS/Linux
taskkill /PID [PID] /F # Windows
# Or use different ports
NEXT_PUBLIC_PORT=3010 bun run devMissing dependencies:
# Reinstall dependencies
rm -rf node_modules
bun installStale build cache:
# Clean all build artifacts
bun run clean
# Rebuild
bun install
bun run devHot reload not working
Symptoms:
- Make changes but nothing updates
- Have to manually refresh
Solutions:
-
Check Turbopack is enabled:
- Should see “Turbopack” in startup logs
-
Increase file watchers (Linux):
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf sudo sysctl -p -
Restart dev server:
# Ctrl+C, then: bun run dev
Environment variables not loading
Symptoms:
❌ Invalid environment variablesSolutions:
-
Create .env files:
# See environment configuration # Manually create apps/web/.env and apps/auth/.env -
Check variable format:
- URLs must start with
http://orhttps:// - Ports must be numbers
- No spaces around
=
- URLs must start with
-
Verify required variables:
DATABASE_URLREDIS_URLMINIO_ENDPOINTMEILISEARCH_URL
-
Restart apps after changing
.env:# Ctrl+C, then: bun run dev
TypeScript errors
Symptoms:
Type error: Cannot find module '@zephyr/db'Solutions:
-
Regenerate types:
bun install # Runs postinstall hooks cd packages/db && bunx prisma generate -
Check TypeScript version:
bunx tsc --version # Should be 5.x.x -
Restart TypeScript server (VS Code):
- Cmd/Ctrl + Shift + P
- “TypeScript: Restart TS Server”
-
Clean and rebuild:
bun run clean bun install bun run build
Build Issues
Build fails
Symptoms:
error: Build failedSolutions:
-
Check for linting errors:
bun run check -
Fix linting automatically:
bun run check -
Check for type errors:
bunx tsc --noEmit -
Clear cache and rebuild:
rm -rf .next .turbo bun run build
Out of memory errors
Symptoms:
FATAL ERROR: Reached heap limitSolutions:
-
Increase Node memory (if using Node):
NODE_OPTIONS=--max_old_space_size=4096 bun run build -
Close other apps to free RAM
-
Build apps individually:
cd apps/web && bun run build cd apps/auth && bun run build cd apps/docs && bun run build
Search Issues
Meilisearch not working
Symptoms:
- Search returns no results
- Error: “Connection refused”
Solutions:
-
Check Meilisearch is running:
curl http://localhost:7700/health # Should return: {"status":"available"} -
Initialize indexes:
bun run search:init -
Check master key:
- Verify
MEILISEARCH_MASTER_KEYmatches Docker setup - Default:
masterKey123
- Verify
-
Restart Meilisearch:
docker compose -f docker/docker-compose.dev.yml restart meilisearch-dev
Search returns no results
Symptoms:
- Search works but no results appear
- Empty results array
Solutions:
-
Populate index:
bun run search:init -
Check index has documents:
curl -H "Authorization: Bearer masterKey123" \ http://localhost:7700/indexes/users/stats -
Create test user and re-index:
# Create user via signup # Then re-run init bun run search:init
Performance Issues
Slow startup
Symptoms:
- Takes > 60 seconds to start apps
- High CPU usage
Solutions:
-
Use Turbopack (should be default):
- Check for “Turbopack” in logs
-
Disable telemetry:
export NEXT_TELEMETRY_DISABLED=1 export TURBO_TELEMETRY_DISABLED=1 -
Close unused apps:
# Run only web app cd apps/web && bun run dev -
Increase system resources:
- Close other applications
- Allocate more RAM to Docker
Slow page loads
Symptoms:
- Pages take > 5 seconds to load
- API calls timeout
Solutions:
-
Check Redis is running:
docker exec -it zephyr-dev-redis redis-cli -a zephyrredis PING # Should return: PONG -
Clear browser cache:
- Hard refresh: Cmd/Ctrl + Shift + R
-
Check network tab in DevTools:
- Identify slow requests
- Check for errors
-
Restart services:
bun run docker:down bun run docker:dev
Common Error Messages
”Module not found”
Error: Cannot find module 'X'Solution:
bun install
cd packages/db && bunx prisma generate“Port already in use”
Error: listen EADDRINUSE: address already in use :::3000Solution: Kill process or use different port (see Apps won’t start)
“Connection refused”
Error: connect ECONNREFUSED 127.0.0.1:5433Solution: Check Docker services are running (see Docker Issues)
“Invalid hook call”
Error: Invalid hook call. Hooks can only be called inside the body of a function componentSolution:
- Check for React version mismatches
- Clear node_modules and reinstall:
bun run clean bun install
“Hydration mismatch”
Warning: Text content did not match...Solution:
- Check for conditional rendering based on window/document
- Use
useEffectfor client-only code - Hard refresh browser
Getting More Help
If your issue isn’t covered here:
-
Check logs:
# Docker logs docker compose -f docker/docker-compose.dev.yml logs # App logs # Check terminal where `bun run dev` is running -
Search GitHub issues:
-
Ask for help:
- Create a new GitHub issue
- Include:
- Error message
- Steps to reproduce
- System info (OS, Docker version, Bun version)
- Relevant logs
When asking for help, always include the output of:
bun --version
docker --version
docker psReset Everything (Last Resort)
If nothing works, nuclear reset:
# Stop everything
bun run docker:down
# Remove all data
bun run docker:clean
# Clean code
bun run clean
# Reinstall
bun install
# Restart
bun run docker:dev
bun run db:up
bun run devThis deletes all data but gives you a fresh start.