Fission-AI/OpenSpec · error
Invalid '${fieldName}' field in config (must be an array of
Error message
Invalid '${fieldName}' field in config (must be an array of store ids) What it means
Error "Invalid '${fieldName}' field in config (must be an array of store ids)" thrown in Fission-AI/OpenSpec.
Source
Thrown at src/core/project-config.ts:198
return Object.keys(operations).length > 0 ? operations : undefined;
}
/**
* Parser for `references:` declarations: string entries or
* {id, remote} maps, normalized to DeclarationEntry[]. Dedup keys on
* id and keeps the first position; the first entry carrying a remote
* supplies it (a later duplicate fills a missing remote, never
* overrides). Invalid entries drop with a warning like other resilient
* fields; returns undefined when the field is absent or normalizes to
* empty.
*/
function parseDeclarationList(raw: unknown): DeclarationEntry[] | undefined {
const fieldName = 'references';
if (raw === undefined) {
return undefined;
}
if (!Array.isArray(raw)) {
console.warn(`Invalid '${fieldName}' field in config (must be an array of store ids)`);
return undefined;
}
const byId = new Map<string, DeclarationEntry>();
let droppedEntries = false;
let droppedRemotes = false;
for (const entry of raw) {
let declaration: DeclarationEntry | null = null;
if (typeof entry === 'string') {
declaration = { id: entry };
} else if (entry && typeof entry === 'object' && !Array.isArray(entry)) {
const candidate = entry as Record<string, unknown>;
if (typeof candidate.id === 'string') {
declaration = { id: candidate.id };
if (typeof candidate.remote === 'string' && candidate.remote.length > 0) {
declaration.remote = candidate.remote;
} else if (candidate.remote !== undefined) {View on GitHub (pinned to 6926ccb18a)
When it happens
Trigger: Thrown at src/core/project-config.ts:198 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Fission-AI/OpenSpec@6926ccb18a (2026-08-25).
Data as JSON: /api/errors/b94f78e52ee5363a.
Report an issue: GitHub.