moeru-ai/airi · error · Error

GODOT4 must point to the Godot executable file, not a direct

Error message

GODOT4 must point to the Godot executable file, not a directory or app bundle.\nConfigured path: ${executable}\nExamples:\n  Windows: C:\\Path\\To\\Godot_v4.x-stable_mono_win64.exe\n  macOS: /Applications/Godot_mono.app/Contents/MacOS/Godot\n  Linux: /path/to/Godot_v4.x-stable_mono_linux.x86_64

What it means

Thrown by validateConfiguredGodotEnginePath when stat(GODOT4) succeeded but the entry is not a regular file — i.e. the path points to a directory or an app bundle (macOS .app). The message lists platform-specific examples of a correct executable path.

Source

Thrown at apps/stage-tamagotchi/src/main/services/airi/godot-stage/index.ts:334

  }
}

async function validateConfiguredGodotEnginePath(executable: string) {
  let executableStats
  try {
    executableStats = await stat(executable)
  }
  catch (error) {
    throw new Error(
      'GODOT4 points to a missing Godot executable.\n'
      + `Configured path: ${executable}\n`
      + 'Set GODOT4 to the absolute path of your Godot 4.x .NET/Mono executable before starting dev mode.\n'
      + `Original error: ${errorMessageFrom(error) ?? 'unknown error'}`,
    )
  }

  if (!executableStats.isFile()) {
    throw new Error(
      'GODOT4 must point to the Godot executable file, not a directory or app bundle.\n'
      + `Configured path: ${executable}\n`
      + 'Examples:\n'
      + '  Windows: C:\\Path\\To\\Godot_v4.x-stable_mono_win64.exe\n'
      + '  macOS: /Applications/Godot_mono.app/Contents/MacOS/Godot\n'
      + '  Linux: /path/to/Godot_v4.x-stable_mono_linux.x86_64',
    )
  }
}

async function resolveGodotBinary(): Promise<GodotBinaryResolution> {
  if (app.isPackaged) {
    const exported = await resolveExportedGodotBinary()
    if (exported) {
      return { executable: exported, mode: 'exported' }
    }

    throw new Error(

View on GitHub (pinned to 27111382b4)

Solutions

  1. On macOS, point GODOT4 at the inner binary, e.g. /Applications/Godot_mono.app/Contents/MacOS/Godot.
  2. On Windows/Linux, point at the executable file (godot.exe / the .x86_64 binary), not its containing folder.
  3. Run `file "$GODOT4"` to confirm the entry is an executable file before launching.

Example fix

# before (macOS)
export GODOT4="/Applications/Godot_mono.app"

# after
export GODOT4="/Applications/Godot_mono.app/Contents/MacOS/Godot"
Defensive patterns

Strategy: validation

Validate before calling

import { stat } from 'node:fs/promises'

async function isExecutableFile(path: string): Promise<boolean> {
  try { return (await stat(path)).isFile() } catch { return false }
}

Type guard

async function isRegularFile(path: string): Promise<boolean> {
  try { return (await stat(path)).isFile() } catch { return false }
}

Prevention

When it happens

Trigger: GODOT4 points at a directory (e.g. /opt/godot) or, on macOS, at the bundle root (e.g. /Applications/Godot_mono.app) instead of the inner MacOS executable.

Common situations: User pasted the folder containing Godot rather than the binary; on macOS the user dragged the .app path from Finder; the path resolves to a symlinked directory.

Related errors


AI-assisted analysis of moeru-ai/airi@27111382b4 (2026-08-12). Data as JSON: /api/errors/1468242e3d16e729. Report an issue: GitHub.