slopus/happy · error

Daemon uninstallation is currently only supported on macOS

Error message

Daemon uninstallation is currently only supported on macOS

What it means

uninstall() mirrors install(): it only supports macOS (launchd removal via ./mac/uninstall) and throws on any other platform before doing anything.

Source

Thrown at packages/happy-cli/src/daemon/uninstall.ts:6

import { logger } from '@/ui/logger';
import { uninstall as uninstallMac } from './mac/uninstall';

export async function uninstall(): Promise<void> {
    if (process.platform !== 'darwin') {
        throw new Error('Daemon uninstallation is currently only supported on macOS');
    }
    
    if (process.getuid && process.getuid() !== 0) {
        throw new Error('Daemon uninstallation requires sudo privileges. Please run with sudo.');
    }
    
    logger.info('Uninstalling Happy CLI daemon for macOS...');
    await uninstallMac();
}

View on GitHub (pinned to b824cd0a46)

Solutions

  1. Run the uninstall on the macOS machine where the daemon was installed
  2. On Linux/Windows, remove any manually created daemon artifacts yourself (launchd is macOS-only, so none should exist)
  3. Ignore the error on non-mac platforms — nothing was installed to remove
  4. Check for stray background happy processes and kill them manually instead

Example fix

// before
await uninstall(); // throws on linux/windows
// after
if (process.platform === 'darwin') {
  await uninstall();
}
Defensive patterns

Strategy: validation

Validate before calling

if (process.platform !== 'darwin') {
  console.log('Daemon uninstall is macOS-only; nothing to remove.');
} else {
  await uninstall();
}

Try / catch

try {
  await uninstall();
} catch (err) {
  if (err.message.includes('only supported on macOS')) {
    console.log('No macOS daemon here; skipping uninstall.');
  } else throw err;
}

Prevention

When it happens

Trigger: Running `happy daemon uninstall` (or equivalent) on Linux or Windows.

Common situations: User migrates off the daemon on a Linux machine following macOS instructions; cleanup script in a non-mac CI tries to uninstall; user confused about which platform the daemon was installed on.

Related errors


AI-assisted analysis of slopus/happy@b824cd0a46 (2026-08-31). Data as JSON: /api/errors/10983688cc427671. Report an issue: GitHub.