{"record":{"id":"80651824ceca6a50","repo":"iOfficeAI/AionUi","slug":"missing-backendbin","errorCode":null,"errorMessage":"   Missing: ${backendBin}","messagePattern":"   Missing: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/web-cli/src/index.ts","lineNumber":171,"sourceCode":"    process.exit(1);\n  }\n\n  console.log(`[aionui-web] version    : ${version}`);\n  console.log(`[aionui-web] data dir   : ${dataDir}`);\n  console.log(`[aionui-web] log dir    : ${logDir}`);\n  console.log(`[aionui-web] static dir : ${staticDir}`);\n  console.log(`[aionui-web] backend bin: ${backendBin}`);\n  console.log(`[aionui-web] launching  : port=${port} allowRemote=${allowRemote}`);\n\n  const backendAvailable = fs.existsSync(backendBin);\n\n  if (!backendAvailable) {\n    // Graceful degradation: serve the SPA shell without spawning backend.\n    // API calls from the browser will 502/ECONNREFUSED — frontend is expected\n    // to surface this to the user (e.g. \"backend missing\" banner).\n    console.warn('');\n    console.warn('⚠️  Backend binary not found — starting in FRONTEND-ONLY mode.');\n    console.warn(`   Missing: ${backendBin}`);\n    console.warn('   The web UI will load but API calls will fail until a backend is available.');\n    console.warn('   To enable backend: download aioncore and set AIONUI_BACKEND_BIN.');\n    console.warn('');\n\n    const handle = await startStaticServer({\n      staticDir,\n      backendPort: 0, // invalid port → API proxy will fail cleanly\n      port,\n      allowRemote,\n    });\n    currentHandle = handle;\n\n    console.log('');\n    console.log('AionUi WebUI (frontend only) is ready');\n    console.log(`  Local  : ${handle.localUrl}`);\n    if (handle.networkUrl) console.log(`  Network: ${handle.networkUrl}`);\n    if (autoOpenBrowser) {\n      const openResult = openBrowserUrl(handle.localUrl);","sourceCodeStart":153,"sourceCodeEnd":189,"githubUrl":"https://github.com/iOfficeAI/AionUi/blob/711aa0550ee183ea495dc33e2c05c7943b70a60a/packages/web-cli/src/index.ts#L153-L189","documentation":"Part of the FRONTEND-ONLY warning block; prints the exact resolved backend binary path that was not found. It is diagnostic output identifying which file/path the CLI looked for, so the operator can correct the env var or install location.","triggerScenarios":"Always printed immediately after the frontend-only banner whenever backend binary resolution fails (bad AIONUI_BACKEND_BIN value, missing install, wrong PATH).","commonSituations":"Env var pointing to an old binary name after an upgrade; symlink dangling; container image built without the backend layer; path with unexpanded ~ or $HOME.","solutions":["Copy the printed path and check it: ls -l <path> to confirm whether it's a typo, missing file, or dangling symlink.","Fix AIONUI_BACKEND_BIN to the correct absolute path (expand ~ manually if needed).","Reinstall/download the aioncore binary if the file genuinely doesn't exist.","Ensure the binary is executable (chmod +x) once present."],"exampleFix":"# before\nAIONUI_BACKEND_BIN='~/aioncore/aioncore' aionui-web start\n#   Missing: ~/aioncore/aioncore   (~ not expanded)\n\n# after\nAIONUI_BACKEND_BIN=\"$HOME/aioncore/aioncore\" aionui-web start","handlingStrategy":"validation","validationCode":"const bin = process.env.AIONUI_BACKEND_BIN;\nif (!bin || !fs.existsSync(bin)) {\n  throw new Error(`AIONUI_BACKEND_BIN resolves to missing path: ${bin}`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Expand ~ and $HOME before assigning the env var.","Symlink the binary into a stable location (e.g. /usr/local/bin) instead of moving it."],"tags":["backend-missing","path-resolution","diagnostic"],"backgroundTag":"missing-backend-binary","analyzedSha":"711aa0550ee183ea495dc33e2c05c7943b70a60a","analyzedAt":"2026-08-28T07:56:06.558Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}