affaan-m/ECC · error · Error
Unsupported uninstall operation kind: ${operation.kind}
Error message
Unsupported uninstall operation kind: ${operation.kind} What it means
executeUninstallOperation walks known kinds (copy-file, render-template, merge-json, remove) and throws this for any other operation.kind. Same forward-compatibility guard as the repair counterpart, scoped to the uninstall code path.
Source
Thrown at scripts/lib/install-lifecycle.js:794
};
}
const previousJson = getOperationPreviousJson(operation);
if (previousJson !== undefined) {
writeContainedFile(operation.destinationPath, formatJson(previousJson), trustedRoot, 'uninstall');
return {
removedPaths: [],
cleanupTargets: []
};
}
return {
removedPaths: [],
cleanupTargets: []
};
}
throw new Error(`Unsupported uninstall operation kind: ${operation.kind}`);
}
function inspectManagedOperation(repoRoot, trustedRoot, operation) {
const destinationPath = operation.destinationPath;
if (!destinationPath) {
return {
status: 'invalid-destination',
operation
};
}
let managedDestination;
try {
managedDestination = getManagedDestination(
destinationPath,
trustedRoot,
'inspect managed operation',
{ allowFinalSymlink: operation.kind === 'remove' }View on GitHub (pinned to 01e15490f0)
Solutions
- Upgrade the installer to the version recorded under state.source.repoVersion / packageVersion.
- If upgrade is not possible, manually remove the install-state file and any installed files referenced by known operations, then re-install.
- Confirm the kind value from the error message — if it looks like corruption, discard the state file.
- Uninstall with the exact installer version that performed the install.
Example fix
// before: state written by ECC 3.x, uninstall run by ECC 2.x // after: npm install -g everything-claude-code@latest ./install.sh --target claude --uninstall
Defensive patterns
Strategy: try-catch
Validate before calling
const KNOWN_UNINSTALL_KINDS = new Set(['copy-file', 'render-template', 'merge-json', 'remove']);
function findUnsupportedUninstallKinds(state) {
return (state.operations || [])
.map(op => op.kind)
.filter(k => !KNOWN_UNINSTALL_KINDS.has(k));
}
// before uninstall: assert findUnsupportedUninstallKinds(state).length === 0 Type guard
function isKnownUninstallKind(op) {
return KNOWN_UNINSTALL_KINDS.has(op.kind);
} Try / catch
try {
await runUninstall(record);
} catch (err) {
if (err.message.startsWith('Unsupported uninstall operation kind')) {
// upgrade installer or remove state and reinstall
} else throw err;
} Prevention
- Keep installer version aligned with the install-state authoring version.
- Prefer fresh reinstall over cross-version uninstall.
- Do not author custom operation kinds.
- Inspect state.source.repoVersion before invoking uninstall.
When it happens
Trigger: Uninstall is run against an install-state whose operation.kind is unknown to the current installer (newer version produced the state, or the state was hand-edited/corrupted).
Common situations: Downgrading ECC after a newer version wrote the state; copying an install-state across machines with mismatched installer versions; third-party tooling that wrote a custom kind.
Related errors
- Unsupported repair operation kind: ${operation.kind}
- Missing merge payload for uninstall: ${operation.destination
- At least one guided harness must be selected
- ${harness.label} is an advanced harness and is not guided-re
- Target '${target}' is supported, but the bare-language insta
AI-assisted analysis of affaan-m/ECC@01e15490f0 (2026-08-13).
Data as JSON: /api/errors/a10af4a44d77e701.
Report an issue: GitHub.