moeru-ai/airi · error · Error
Unable to locate engines/stage-tamagotchi-godot/project.godo
Error message
Unable to locate engines/stage-tamagotchi-godot/project.godot from ${getElectronMainDirname()}. What it means
Thrown after resolveGodotProjectPath walks up from getElectronMainDirname() looking for engines/stage-tamagotchi-godot/project.godot and never finds it (loop terminates when dirname(current) === current, i.e. filesystem root). This path is only used in development/unpackaged contexts where the Godot project source is expected to sit in the repo tree.
Source
Thrown at apps/stage-tamagotchi/src/main/services/airi/godot-stage/index.ts:290
while (true) {
const projectPath = resolve(currentDirectory, 'engines', 'stage-tamagotchi-godot')
try {
await access(join(projectPath, 'project.godot'))
return projectPath
}
catch {}
const parentDirectory = dirname(currentDirectory)
if (parentDirectory === currentDirectory) {
break
}
currentDirectory = parentDirectory
}
throw new Error(`Unable to locate engines/stage-tamagotchi-godot/project.godot from ${getElectronMainDirname()}.`)
}
// Packaged builds ship a pre-exported sidecar under Electron resources.
async function resolveExportedGodotBinary(): Promise<string | undefined> {
const platform = process.platform
let binaryName: string
if (platform === 'win32') {
binaryName = 'godot-stage.exe'
}
else if (platform === 'darwin') {
binaryName = join('godot-stage.app', 'Contents', 'MacOS', 'godot-stage')
}
else {
binaryName = 'godot-stage'
}
const binaryPath = join(process.resourcesPath, 'godot-stage', binaryName)View on GitHub (pinned to 27111382b4)
Solutions
- Run the Electron dev app from the repository root so the upward search reaches engines/stage-tamagotchi-godot/project.godot.
- If the engines folder is a submodule, run git submodule update --init to restore project.godot.
- Confirm getElectronMainDirname() resolves into the repo tree (check the location helper).
- For packaged builds, ensure the code path used resolves the exported binary instead of the project file.
Defensive patterns
Strategy: validation
Validate before calling
import { existsSync } from 'node:fs'
import { join } from 'node:path'
function godotProjectExists(root: string): boolean {
return existsSync(join(root, 'engines', 'stage-tamagotchi-godot', 'project.godot'))
} Type guard
function godotProjectExists(root: string): boolean {
return existsSync(join(root, 'engines', 'stage-tamagotchi-godot', 'project.godot'))
} Prevention
- Run the Electron dev app from the repo root.
- Initialize the engines submodule if it is one.
- Confirm getElectronMainDirname() resolves inside the repo tree.
When it happens
Trigger: Running the Electron dev build from a location whose ancestor directories do not contain engines/stage-tamagotchi-godot/project.godot — e.g. running from a copied/extracted subset of the repo, from a build output directory, or after the engines folder was moved/deleted.
Common situations: Cloning only part of the monorepo; running after a partial clean; the engines/stage-tamagotchi-godot submodule not being initialized; running the packaged app through a code path that should only execute in dev.
Related errors
- GODOT4 points to a missing Godot executable.\nConfigured pat
- GODOT4 must point to the Godot executable file, not a direct
- Invalid Godot stage scene input payload.
- Godot stage exported binary not found. Expected at: ${join(p
- GODOT4 is required to start Godot Stage in development mode.
AI-assisted analysis of moeru-ai/airi@27111382b4 (2026-08-12).
Data as JSON: /api/errors/079a1ca12b7e7d00.
Report an issue: GitHub.