affaan-m/ECC · error
Unsupported install request mode
Error message
Unsupported install request mode: ${request.mode} What it means
createRawInstallPlan dispatches on request.mode, which normalizeInstallRequest sets to 'manifest' or 'legacy-compat'. If mode holds any other value, no planner branch matches and the library throws, indicating a malformed or hand-crafted request object.
Solutions
- Produce the request via normalizeInstallRequest instead of building it manually.
- Check request.mode is exactly 'manifest' or 'legacy-compat' before calling.
- Update any persisted/serialized requests to the current mode vocabulary after a library upgrade.
Example fix
// before
createInstallPlanFromRequest({ mode: 'manifest-mode', ... })
// after
createInstallPlanFromRequest({ mode: 'manifest', ... }) Defensive patterns
Strategy: validation
Validate before calling
const ALLOWED_MODES = ['manifest', 'legacy-compat']
if (!ALLOWED_MODES.includes(request?.mode)) throw new Error(`mode must be one of ${ALLOWED_MODES.join(', ')}`) Type guard
function hasValidMode(r) {
return r !== null && typeof r === 'object' && (r.mode === 'manifest' || r.mode === 'legacy-compat')
} Try / catch
try {
const plan = createInstallPlanFromRequest(req)
} catch (err) {
if (err.message.startsWith('Unsupported install request mode')) {
console.error(`Bad mode "${req?.mode}" — rebuild the request with normalizeInstallRequest()`)
} else throw err
} Prevention
- Only construct requests through normalizeInstallRequest.
- Spell modes exactly as 'manifest' or 'legacy-compat'.
- Migrate persisted requests after library upgrades that change mode names.
- Assert request.mode in tests before dispatch.
When it happens
Trigger: Passing a request object whose mode property is a typo ('Manifest', 'legacy'), a stale value from an older library version, or an object not produced by normalizeInstallRequest (mode missing/undefined also lands here).
Common situations: Constructing request objects by hand in tests; version skew where an older serialized request is replayed against a newer runtime; monkey-patching normalizeInstallRequest output.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- A normalized install request is required
- An unqualified or incompatible Nasiko executable or receipt…
- checked task text
- Circular install dependency detected at
- Invalid
AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16).
Data as JSON: /api/errors/6af8e77110276b3b.
Report an issue: GitHub.
Appendix: source
Thrown at scripts/lib/install/runtime.js:61
env: resolveInvocationEnvironment(options),
claudeRulesDir: options.claudeRulesDir,
sourceRoot: options.sourceRoot,
exemptValidationCodes: options.exemptValidationCodes || [],
});
}
if (request.mode === 'legacy') {
return createLegacyInstallPlan({
target: request.target,
languages: request.languages,
projectRoot: options.projectRoot,
homeDir: options.homeDir,
claudeRulesDir: options.claudeRulesDir,
sourceRoot: options.sourceRoot,
});
}
throw new Error(`Unsupported install request mode: ${request.mode}`);
}
module.exports = {
createInstallPlanFromRequest,
};
View on GitHub (pinned to 8321021c54)