affaan-m/ECC · error · Error
Invalid install config ${resolvedPath}: ${formatValidationEr
Error message
Invalid install config ${resolvedPath}: ${formatValidationErrors(validator.errors)} What it means
Thrown by loadInstallConfig when AJV validation of the parsed config against schemas/ecc-install-config.schema.json fails. The message is built by formatValidationErrors: each AJV error becomes '<instancePath || '/'> <message>' and the entries are joined with '; '. The full resolved path is included so the offending file is unambiguous.
Source
Thrown at scripts/lib/install/config.js:67
function findDefaultInstallConfigPath(options = {}) {
const cwd = options.cwd || process.cwd();
const candidatePath = path.join(cwd, DEFAULT_INSTALL_CONFIG);
return fs.existsSync(candidatePath) ? candidatePath : null;
}
function loadInstallConfig(configPath, options = {}) {
const resolvedPath = resolveInstallConfigPath(configPath, options);
if (!fs.existsSync(resolvedPath)) {
throw new Error(`Install config not found: ${resolvedPath}`);
}
const raw = readJson(resolvedPath, path.basename(resolvedPath));
const validator = getValidator();
if (!validator(raw)) {
throw new Error(
`Invalid install config ${resolvedPath}: ${formatValidationErrors(validator.errors)}`
);
}
return {
path: resolvedPath,
version: raw.version,
target: raw.target || null,
profileId: raw.profile || null,
moduleIds: dedupeStrings(raw.modules),
includeComponentIds: dedupeStrings(raw.include),
excludeComponentIds: dedupeStrings(raw.exclude),
options: raw.options && typeof raw.options === 'object' ? { ...raw.options } : {},
};
}
module.exports = {
DEFAULT_INSTALL_CONFIG,View on GitHub (pinned to 01e15490f0)
Solutions
- Read each validation error in the message — every entry is a JSON pointer plus a constraint, e.g. '/target must be equal to one of the allowed values'.
- Open schemas/ecc-install-config.schema.json in the ECC repo and inspect the rule at that pointer.
- Fix the named fields and re-run.
- If the schema changed upstream, regenerate your config from the latest example in the ECC docs.
Example fix
// before (ecc-install.json)
{ "target": "Claude", "modules": "core" }
// after
{ "target": "claude", "modules": ["core"] } Defensive patterns
Strategy: validation
Validate before calling
const Ajv = require('ajv');
const schema = require(path.join(repoRoot, 'schemas/ecc-install-config.schema.json'));
const validate = new Ajv({ allErrors: true }).compile(schema);
const raw = JSON.parse(fs.readFileSync(configPath, 'utf8'));
if (!validate(raw)) {
console.error('Schema violations:', validate.errors);
} Type guard
function isInstallConfigShape(v) {
return Boolean(
v && typeof v === 'object'
&& typeof v.target === 'string'
&& Array.isArray(v.modules)
);
} Try / catch
try {
loadInstallConfig(p);
} catch (err) {
if (/Invalid install config/.test(err.message)) {
console.error('Schema violations:', err.message);
}
throw err;
} Prevention
- Keep a canonical example config in the repo and diff against it after schema upgrades.
- Re-validate the config against the bundled schema in CI before invoking the installer.
- Read schema changes in the ECC changelog before bumping versions.
When it happens
Trigger: The config parses as JSON but violates the schema: missing required field (e.g. target), wrong type (modules as a string instead of array), an unknown property when additionalProperties is false, or an enum value not in the allowed list.
Common situations: Outdated config schema (older ECC version's config against a newer schema); a typo in a field name; misreading the docs; an extra field the schema forbids.
Related errors
- ECC_PROJECT_DIR must be a child path within /workspace.
- Unknown argument: ${arg}
- Unable to infer ECC repo root from install-state operations
- Invalid ECC repo root: missing package.json at ${packageJson
- Invalid ECC repo root: missing install script at ${installAp
AI-assisted analysis of affaan-m/ECC@01e15490f0 (2026-08-13).
Data as JSON: /api/errors/3538e5e901f9c145.
Report an issue: GitHub.