{"record":{"id":"4755e8d43a228363","repo":"moeru-ai/airi","slug":"godot4-is-required-to-start-godot-stage-in-develop","errorCode":null,"errorMessage":"GODOT4 is required to start Godot Stage in development mode.\\nSet GODOT4 to the absolute path of your Godot 4.x .NET/Mono executable, then restart the Electron dev app.\\nExamples:\\n  PowerShell: $env:GODOT4 = \"C:\\\\Path\\\\To\\\\Godot_v4.x-stable_mono_win64.exe\"\\n  Bash: export GODOT4=\"/path/to/godot\"","messagePattern":"GODOT4 is required to start Godot Stage in development mode\\.\\\\nSet GODOT4 to the absolute path of your Godot 4\\.x \\.NET/Mono executable, then restart the Electron dev app\\.\\\\nExamples:\\\\n  PowerShell: \\$env:GODOT4 = \"C:\\\\\\\\Path\\\\\\\\To\\\\\\\\Godot_v4\\.x-stable_mono_win64\\.exe\"\\\\n  Bash: export GODOT4=\"/path/to/godot\"","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/stage-tamagotchi/src/main/services/airi/godot-stage/index.ts","lineNumber":360,"sourceCode":"  }\n}\n\nasync function resolveGodotBinary(): Promise<GodotBinaryResolution> {\n  if (app.isPackaged) {\n    const exported = await resolveExportedGodotBinary()\n    if (exported) {\n      return { executable: exported, mode: 'exported' }\n    }\n\n    throw new Error(\n      'Godot stage exported binary not found. '\n      + `Expected at: ${join(process.resourcesPath, 'godot-stage')}`,\n    )\n  }\n\n  const envPath = process.env.GODOT4?.trim()\n  if (!envPath) {\n    throw new Error(\n      'GODOT4 is required to start Godot Stage in development mode.\\n'\n      + 'Set GODOT4 to the absolute path of your Godot 4.x .NET/Mono executable, then restart the Electron dev app.\\n'\n      + 'Examples:\\n'\n      + '  PowerShell: $env:GODOT4 = \"C:\\\\Path\\\\To\\\\Godot_v4.x-stable_mono_win64.exe\"\\n'\n      + '  Bash: export GODOT4=\"/path/to/godot\"',\n    )\n  }\n\n  await validateConfiguredGodotEnginePath(envPath)\n  return { executable: envPath, mode: 'engine' }\n}\n\n/**\n * Creates the shared Godot stage manager.\n *\n * Call stack:\n *\n * setupGodotStageManager","sourceCodeStart":342,"sourceCodeEnd":378,"githubUrl":"https://github.com/moeru-ai/airi/blob/27111382b4a79a7e983289d6e983a06af185ed0f/apps/stage-tamagotchi/src/main/services/airi/godot-stage/index.ts#L342-L378","documentation":"Thrown by resolveGodotBinary in development mode (app.isPackaged false) when process.env.GODOT4 is unset or empty after trimming. The Godot stage cannot start in dev mode without an engine executable, so the error tells the user to set GODOT4 with platform-specific examples (PowerShell and Bash).","triggerScenarios":"Running the Electron dev app without having exported GODOT4, or with GODOT4 set to only whitespace.","commonSituations":"Fresh dev setup; GODOT4 set in a different shell profile that the Electron launcher didn't source; env var set for a previous session but lost after reboot; CI runner missing the secret/env.","solutions":["Set GODOT4 to the absolute path of a Godot 4.x .NET/Mono executable in the same shell that launches the dev app (PowerShell: $env:GODOT4 = \"...\"; Bash: export GODOT4=\"/path/to/godot\").","Persist it in the shell profile or a local .env consumed by the dev script.","Restart the Electron dev app after setting the variable so the main process re-reads env.","Validate the path also passes validateConfiguredGodotEnginePath (exists and is a file)."],"exampleFix":"# before: GODOT4 unset\nelectron .\n\n# after\nexport GODOT4=\"/opt/Godot_v4.x-stable_mono_linux.x86_64\"\nelectron .","handlingStrategy":"validation","validationCode":"function godotDevExecutableConfigured(): boolean {\n  return !!(process.env.GODOT4 && process.env.GODOT4.trim().length > 0)\n}","typeGuard":"function godotDevExecutableConfigured(): boolean {\n  const v = process.env.GODOT4\n  return typeof v === 'string' && v.trim().length > 0\n}","tryCatchPattern":null,"preventionTips":["Set GODOT4 in the same shell that launches the dev app.","Persist it in a shell profile or local .env consumed by the dev script.","Restart the Electron main process after setting the variable."],"tags":["godot-stage","environment-variables","development","configuration","startup"],"backgroundTag":null,"analyzedSha":"27111382b4a79a7e983289d6e983a06af185ed0f","analyzedAt":"2026-08-12T18:33:34.132Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}