{"record":{"id":"358b6b1e59607fa4","repo":"bmad-code-org/BMAD-METHOD","slug":"no-valid-actions-available-for-this-installation","errorCode":null,"errorMessage":"No valid actions available for this installation","messagePattern":"No valid actions available for this installation","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"tools/installer/ui.js","lineNumber":302,"sourceCode":"      }\n\n      // Common actions\n      choices.push({ name: 'Modify BMAD Installation', value: 'update' });\n\n      // Check if action is provided via command-line\n      if (options.action) {\n        const validActions = choices.map((c) => c.value);\n        if (!validActions.includes(options.action)) {\n          throw new Error(`Invalid action: ${options.action}. Valid actions: ${validActions.join(', ')}`);\n        }\n        actionType = options.action;\n        await prompts.log.info(`Using action from command-line: ${actionType}`);\n      } else if (options.yes) {\n        // Default to quick-update if available, unless flags that require the\n        // full update path are present (e.g. --custom-source which re-clones\n        // modules at a new version — quick-update skips that entirely).\n        if (choices.length === 0) {\n          throw new Error('No valid actions available for this installation');\n        }\n        const hasQuickUpdate = choices.some((c) => c.value === 'quick-update');\n        const needsFullUpdate = !!options.customSource;\n        actionType = hasQuickUpdate && !needsFullUpdate ? 'quick-update' : (choices.find((c) => c.value === 'update') || choices[0]).value;\n        await prompts.log.info(`Non-interactive mode (--yes): defaulting to ${actionType}`);\n      } else {\n        actionType = await prompts.select({\n          message: 'How would you like to proceed?',\n          choices: choices,\n          default: choices[0].value,\n        });\n      }\n\n      // Handle quick update separately\n      if (actionType === 'quick-update') {\n        // Quick update never shows the module picker, so this is the only\n        // place an existing install of a deprecated module hears about it.\n        await this._warnDeprecatedModules(existingInstall.moduleIds || []);","sourceCodeStart":284,"sourceCodeEnd":320,"githubUrl":"https://github.com/bmad-code-org/BMAD-METHOD/blob/b70486b9bdcb0a404d329e2a763b57964e7f1360/tools/installer/ui.js#L284-L320","documentation":"Thrown in --yes non-interactive mode when the choices array is empty. Under normal flow 'update' is always pushed for an existing install, so choices is empty only in a defensive edge case — e.g. _bmad/ exists but getExistingInstallation reports no install info, leaving no action to default to.","triggerScenarios":"Running with --yes against an installation where _bmad/ is detected but neither quick-update nor update was pushed onto choices (corrupted/partial install state).","commonSituations":"Stale/partial _bmad/ artifact that registers as existing but yields no install info; an interrupted prior install left a directory but no manifest.","solutions":["Run without --yes to see the interactive menu and which actions (if any) are offered.","Inspect _bmad/ — if it's a stale/partial artifact, remove it and run a fresh install.","If it persists on a clean directory, report it — this branch is defensive and shouldn't trigger under normal state."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if (options.yes && !hasExistingInstall) {\n  console.error('--yes requires an existing install or an explicit --action; no actions are available.');\n  process.exit(1);\n}","typeGuard":null,"tryCatchPattern":"try {\n  await ui.run(options);\n} catch (e) {\n  if (/No valid actions available/.test(e.message)) {\n    // inspect _bmad/; if stale, remove and run a fresh install without --yes\n  } else { throw e; }\n}","preventionTips":["Avoid --yes against a directory with a stale/partial _bmad/ artifact; clean it first.","Run interactively once to confirm which actions the install state offers before scripting with --yes."],"tags":["cli","installer","non-interactive","defensive-guard"],"backgroundTag":null,"analyzedSha":"b70486b9bdcb0a404d329e2a763b57964e7f1360","analyzedAt":"2026-08-13T01:21:12.247Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}