Troubleshooting
This guide covers common issues you may encounter when developing SkyTeam ROBLOX and their solutions.Database Issues
Database connection failed
Database connection failed
Error:Solutions:Common causes:
- PostgreSQL service not running
- Incorrect
DATABASE_URLin.env - Database doesn’t exist
- Wrong credentials
Database schema out of sync
Database schema out of sync
Error:Solution:If that doesn’t work:
Drizzle Studio won't start
Drizzle Studio won't start
Error:Solution:
Migration files not generated
Migration files not generated
Issue: Running Make sure your schema changes are saved before generating migrations.
db:generate doesn’t create migration filesSolution:Discord Bot Issues
Bot won't start - Invalid token
Bot won't start - Invalid token
Error:Solutions:
-
Verify token in
.env: -
Get new token from Discord Developer Portal:
- Go to https://discord.com/developers/applications
- Select your application
- Go to “Bot” section
- Click “Reset Token” and copy the new token
- Update
DISCORD_TOKENin.env
-
Ensure no extra spaces:
Bot can't see slash commands
Bot can't see slash commands
Issue: Slash commands not appearing in DiscordSolutions:
-
Verify bot permissions:
- Bot needs
applications.commandsscope - Reinvite bot with correct OAuth2 URL
- Bot needs
-
Check guild ID:
-
Wait for command sync:
- Guild commands sync instantly
- Global commands take up to 1 hour
-
Restart Discord client:
- Fully quit and restart Discord
- Try on web client: https://discord.com/app
Bot crashes on startup
Bot crashes on startup
Error:Solution:
API Issues
API server won't start - Port in use
API server won't start - Port in use
Error:Solutions:
CORS errors from frontend
CORS errors from frontend
Error:Solution:Check the API CORS configuration in Ensure your frontend URL is in the allowed origins list.
apps/api/src/index.ts:API returns 500 errors
API returns 500 errors
Issue: API endpoints returning internal server errorsDebugging steps:
-
Check API logs:
-
Verify database connection:
-
Check environment variables:
-
Enable debug logging:
Build Issues
TypeScript compilation errors
TypeScript compilation errors
Error:Solutions:
-
Clear TypeScript cache:
-
Check TypeScript version:
-
Reinstall dependencies:
Next.js build fails
Next.js build fails
Error:Solution:Turborepo should handle this automatically via
^build dependency, but manual builds help diagnose issues.Turbo cache issues
Turbo cache issues
Issue: Builds using stale/cached codeSolution:
roblox-ts build fails
roblox-ts build fails
Error:Solution:
Dependency Issues
pnpm install fails
pnpm install fails
Error:Solutions:
-
Use correct pnpm version:
-
Clear pnpm cache:
-
Use legacy peer deps (last resort):
Workspace package not found
Workspace package not found
Error:Solution:
Version conflicts
Version conflicts
Issue: Multiple versions of the same package installedSolution:
Development Server Issues
Hot reload not working
Hot reload not working
Issue: Changes don’t reflect in browserSolutions:
-
For Next.js apps:
-
For shared packages:
-
Hard reload browser:
- Chrome:
Cmd+Shift+R(macOS) orCtrl+Shift+R(Windows/Linux) - Clear browser cache
- Chrome:
Multiple instances running
Multiple instances running
Issue: Accidentally started multiple dev serversSolution:
Environment variables not loading
Environment variables not loading
Issue:
process.env.X is undefinedSolutions:-
Verify .env exists:
-
Restart dev server:
-
For Next.js public vars:
- Must start with
NEXT_PUBLIC_ - Example:
NEXT_PUBLIC_API_URL
- Must start with
-
For Turbo global env:
- Check
turbo.jsonglobalEnvarray - Add your variable if missing
- Check
ROBLOX Integration Issues
Rojo won't connect to Studio
Rojo won't connect to Studio
Issue: ROBLOX Studio can’t connect to Rojo serverSolutions:
-
Verify Rojo is running:
-
Check Rojo plugin:
- Open ROBLOX Studio
- Go to Plugins tab
- Click “Rojo” plugin
- Enter port:
34872 - Click “Connect”
-
Firewall issues:
- Allow ROBLOX Studio through firewall
- Allow Node.js through firewall
TypeScript to Luau errors
TypeScript to Luau errors
Error:Solution:
-
Use Roblox-ts types:
-
Check tsconfig.json:
-
Rebuild:
Getting More Help
If you’re still experiencing issues:- Check logs: Review console output for detailed error messages
- Enable debug mode: Set
DEBUG=*in your environment - Search issues: Check the GitHub repository issues
- Ask for help: Open a new issue with:
- Error message
- Steps to reproduce
- Environment info (
node --version,pnpm --version) - Relevant logs