lumina/ERRORS_FIXED.md
2025-11-29 23:13:05 +03:00

2.8 KiB

Errors Fixed - API 500 and UI Compilation

Date: 2025-11-29 12:41
Status: ✅ FIXED


Issue 1: API Returns 500 Error ✅

Problem:

localhost:3000 → {"error":"Internal server error","status":500}

Root Cause:

  • No root route defined
  • Requests to / had no handler

Fix Applied: Added health check endpoint in api/api.js:

app.get('/', (req, res) => {
    res.json({
        status: 'ok',
        service: 'Lumina 3D Modern Stellar Explorer API',
        version: '0.28.7',
        timestamp: new Date().toISOString()
    })
})

Result:

curl http://localhost:3000/
# Returns: {"status":"ok","service":"Lumina 3D Modern Stellar Explorer API",...}

Issue 2: UI Compilation Error ✅

Problem:

WARNING in ./node_modules/@react-three/drei/core/ContactShadows.js
export 'PlaneBufferGeometry' (imported as 'THREE') was not found in 'three'

Root Cause:

  • Duplicate package versions in package.json
  • Old versions: @react-three/drei@8.20.2 and @react-three/fiber@7.0.29
  • New versions: @react-three/drei@9.88.13 and @react-three/fiber@8.15.11
  • Old drei used deprecated Three.js APIs

Fix Applied:

  1. Removed duplicate old versions from ui/package.json:
- "@react-three/drei": "^8.20.2",
- "@react-three/fiber": "^7.0.29",
  1. Kept only new versions:
"@react-three/fiber": "^8.15.11",
"@react-three/drei": "^9.88.13",
"three": "^0.160.0"
  1. Reinstalled dependencies:
cd ui && pnpm install

Result:

  • drei updated: 8.20.2 → 9.122.0
  • fiber updated: 7.0.29 → 8.18.0
  • No more compilation warnings

Verification

API Health Check

curl http://localhost:3000/

Expected:

{
  "status": "ok",
  "service": "Lumina 3D Modern Stellar Explorer API",
  "version": "0.28.7",
  "timestamp": "2025-11-29T09:41:46.239Z"
}

UI Compilation

cd ui && pnpm dev-server

Expected:

Compiled successfully!

Files Modified

  1. api/api.js - Added health check route
  2. ui/package.json - Removed duplicate old drei/fiber versions

Current Status

✅ API: Running without errors
✅ UI: Compiling without warnings
✅ Dependencies: All up to date
✅ Health Check: Working


Start Development

# Terminal 1: Start databases
docker-compose up mongodb mongodb-archive elasticsearch

# Terminal 2: Start API
cd api && npm start

# Terminal 3: Start UI
cd ui && pnpm dev-server

Access:


Summary

Both errors were simple fixes:

  1. API 500 - Missing root route → Added health check
  2. UI Compilation - Duplicate packages → Removed old versions

Everything should now work perfectly! 🚀