Skip to content

pai-observability-server: manage.sh should auto-install dependencies #548

@wojteksbt

Description

@wojteksbt

Problem

When running manage.sh start after a fresh clone/download of the observability pack, the server fails silently because dependencies aren't installed.

Reproduction:

  1. Download/clone the pai-observability-server pack
  2. Run observability/manage.sh start
  3. Script outputs "✅ Observability running at http://localhost:5172"
  4. But server doesn't actually respond - port not bound

Root cause: node_modules missing in apps/server and apps/client

Proposed Fix

Add dependency check at the start of the start and start-detached cases in manage.sh:

# Check and install dependencies if needed
if [ ! -d "$SCRIPT_DIR/apps/server/node_modules" ]; then
    echo "📦 Installing server dependencies..."
    (cd "$SCRIPT_DIR/apps/server" && bun install)
fi

if [ ! -d "$SCRIPT_DIR/apps/client/node_modules" ]; then
    echo "📦 Installing client dependencies..."
    (cd "$SCRIPT_DIR/apps/client" && bun install)
fi

This ensures first-time users get a working server without manual intervention.

Environment

  • macOS
  • bun v1.3.8
  • PAI v2.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions