affaan-m/ECC · error · Error
Invalid installState identity: targetId must be a non-empty
Error message
Invalid installState identity: targetId must be a non-empty string
What it means
Generic guard inside normalizeInstallStateIdentity: identity.targetId exists but is not a non-empty string. targetId is the primary key for install state records and empty ids would collide.
Source
Thrown at scripts/lib/state-store/queries.js:359
? []
: installState.modules,
operations: installState.operations === undefined || installState.operations === null
? []
: installState.operations,
installedAt: installState.installedAt || new Date().toISOString(),
sourceVersion: installState.sourceVersion ?? null,
};
}
function normalizeInstallStateIdentity(identity) {
if (!identity || typeof identity !== 'object') {
throw new Error('Invalid installState identity: expected targetId and targetRoot');
}
const targetId = identity.targetId;
const targetRoot = identity.targetRoot;
if (typeof targetId !== 'string' || targetId.length === 0) {
throw new Error('Invalid installState identity: targetId must be a non-empty string');
}
if (typeof targetRoot !== 'string' || targetRoot.length === 0) {
throw new Error('Invalid installState identity: targetRoot must be a non-empty string');
}
return { targetId, targetRoot };
}
function normalizeGovernanceEventInput(governanceEvent) {
return {
id: governanceEvent.id,
sessionId: governanceEvent.sessionId ?? null,
eventType: governanceEvent.eventType,
payload: governanceEvent.payload ?? null,
resolvedAt: governanceEvent.resolvedAt ?? null,
resolution: governanceEvent.resolution ?? null,
createdAt: governanceEvent.createdAt || new Date().toISOString(),
};View on GitHub (pinned to 06c5e118c4)
Solutions
- Provide a value that satisfies the validation: Invalid installState identity: targetId must be a non-empty string
- Check the calling command or configuration for the reported field and correct it, then retry.
- Run the command with --help to review the expected input shape and allowed values.
Example fix
Correct the invalid input so that the following holds: Invalid installState identity: targetId must be a non-empty string
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at scripts/lib/state-store/queries.js:359 when the library encounters an invalid state.
Common situations: Raised when input validation fails because: Invalid installState identity: targetId must be a non-empty string. Typically caused by a missing, malformed, or out-of-range argument or configuration value.
AI-assisted analysis of affaan-m/ECC@06c5e118c4 (2026-08-18).
Data as JSON: /api/errors/e0667ac2e071c39e.
Report an issue: GitHub.