{"record":{"id":"dfb01359ddfbe4cf","repo":"iOfficeAI/AionUi","slug":"to-enable-backend-download-aioncore-and-set-ai","errorCode":null,"errorMessage":"   To enable backend: download aioncore and set AIONUI_BACKEND_BIN.","messagePattern":"   To enable backend: download aioncore and set AIONUI_BACKEND_BIN\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/web-cli/src/index.ts","lineNumber":173,"sourceCode":"\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);\n      if (openResult.ok) {\n        console.log(`[aionui-web] opened ${handle.localUrl} in your browser.`);","sourceCodeStart":155,"sourceCodeEnd":191,"githubUrl":"https://github.com/iOfficeAI/AionUi/blob/711aa0550ee183ea495dc33e2c05c7943b70a60a/packages/web-cli/src/index.ts#L155-L191","documentation":"Instructional line in the FRONTEND-ONLY warning block naming the remediation: download aioncore and set AIONUI_BACKEND_BIN. It's the actionable footer of the graceful-degradation warning emitted when backend binary resolution fails.","triggerScenarios":"Printed whenever the backend binary is missing; the fix it names (env var + download) is the resolution path.","commonSituations":"First-time setup; onboarding docs skipped; deployment scripts missing the env var; version upgrades that changed the download location.","solutions":["Download the aioncore release matching your platform.","export AIONUI_BACKEND_BIN=/path/to/aioncore (persist in shell profile or service Environment config).","Verify with a preflight existence check before starting the CLI."],"exampleFix":"# before\naionui-web start\n\n# after\ncurl -L -o /usr/local/bin/aioncore <aioncore-release-url>\nchmod +x /usr/local/bin/aioncore\nAIONUI_BACKEND_BIN=/usr/local/bin/aioncore aionui-web start","handlingStrategy":"validation","validationCode":"if (!fs.existsSync(process.env.AIONUI_BACKEND_BIN ?? '')) {\n  console.error('Download aioncore and set AIONUI_BACKEND_BIN before starting.');\n  process.exit(1);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Automate the aioncore download in your setup script/provisioning.","Persist AIONUI_BACKEND_BIN in the service definition or shell profile."],"tags":["backend-missing","environment-variable","setup"],"backgroundTag":"missing-backend-binary","analyzedSha":"711aa0550ee183ea495dc33e2c05c7943b70a60a","analyzedAt":"2026-08-28T07:56:06.558Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}