{"record":{"id":"079a1ca12b7e7d00","repo":"moeru-ai/airi","slug":"unable-to-locate-engines-stage-tamagotchi-godot-pr","errorCode":null,"errorMessage":"Unable to locate engines/stage-tamagotchi-godot/project.godot from ${getElectronMainDirname()}.","messagePattern":"Unable to locate engines/stage-tamagotchi-godot/project\\.godot from (.+?)\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/stage-tamagotchi/src/main/services/airi/godot-stage/index.ts","lineNumber":290,"sourceCode":"\n  while (true) {\n    const projectPath = resolve(currentDirectory, 'engines', 'stage-tamagotchi-godot')\n\n    try {\n      await access(join(projectPath, 'project.godot'))\n      return projectPath\n    }\n    catch {}\n\n    const parentDirectory = dirname(currentDirectory)\n    if (parentDirectory === currentDirectory) {\n      break\n    }\n\n    currentDirectory = parentDirectory\n  }\n\n  throw new Error(`Unable to locate engines/stage-tamagotchi-godot/project.godot from ${getElectronMainDirname()}.`)\n}\n\n// Packaged builds ship a pre-exported sidecar under Electron resources.\nasync function resolveExportedGodotBinary(): Promise<string | undefined> {\n  const platform = process.platform\n  let binaryName: string\n\n  if (platform === 'win32') {\n    binaryName = 'godot-stage.exe'\n  }\n  else if (platform === 'darwin') {\n    binaryName = join('godot-stage.app', 'Contents', 'MacOS', 'godot-stage')\n  }\n  else {\n    binaryName = 'godot-stage'\n  }\n\n  const binaryPath = join(process.resourcesPath, 'godot-stage', binaryName)","sourceCodeStart":272,"sourceCodeEnd":308,"githubUrl":"https://github.com/moeru-ai/airi/blob/27111382b4a79a7e983289d6e983a06af185ed0f/apps/stage-tamagotchi/src/main/services/airi/godot-stage/index.ts#L272-L308","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import { existsSync } from 'node:fs'\nimport { join } from 'node:path'\n\nfunction godotProjectExists(root: string): boolean {\n  return existsSync(join(root, 'engines', 'stage-tamagotchi-godot', 'project.godot'))\n}","typeGuard":"function godotProjectExists(root: string): boolean {\n  return existsSync(join(root, 'engines', 'stage-tamagotchi-godot', 'project.godot'))\n}","tryCatchPattern":null,"preventionTips":["Run the Electron dev app from the repo root.","Initialize the engines submodule if it is one.","Confirm getElectronMainDirname() resolves inside the repo tree."],"tags":["godot-stage","filesystem","development","electron","repository-layout"],"backgroundTag":null,"analyzedSha":"27111382b4a79a7e983289d6e983a06af185ed0f","analyzedAt":"2026-08-12T18:33:34.132Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}