{"record":{"id":"3538e5e901f9c145","repo":"affaan-m/ECC","slug":"invalid-install-config-resolvedpath-formatva","errorCode":null,"errorMessage":"Invalid install config ${resolvedPath}: ${formatValidationErrors(validator.errors)}","messagePattern":"Invalid install config (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scripts/lib/install/config.js","lineNumber":69,"sourceCode":"\nfunction findDefaultInstallConfigPath(options = {}) {\n  const cwd = options.cwd || process.cwd();\n  const candidatePath = path.join(cwd, DEFAULT_INSTALL_CONFIG);\n  return fs.existsSync(candidatePath) ? candidatePath : null;\n}\n\nfunction loadInstallConfig(configPath, options = {}) {\n  const resolvedPath = resolveInstallConfigPath(configPath, options);\n\n  if (!fs.existsSync(resolvedPath)) {\n    throw new Error(`Install config not found: ${resolvedPath}`);\n  }\n\n  const raw = readJson(resolvedPath, path.basename(resolvedPath));\n  const validator = getValidator();\n\n  if (!validator(raw)) {\n    throw new Error(\n      `Invalid install config ${resolvedPath}: ${formatValidationErrors(validator.errors)}`\n    );\n  }\n\n  return {\n    path: resolvedPath,\n    version: raw.version,\n    target: raw.target || null,\n    profileId: raw.profile || null,\n    moduleIds: dedupeStrings(raw.modules),\n    includeComponentIds: dedupeStrings(raw.include),\n    excludeComponentIds: dedupeStrings(raw.exclude),\n    options: raw.options && typeof raw.options === 'object' ? { ...raw.options } : {},\n  };\n}\n\nmodule.exports = {\n  DEFAULT_INSTALL_CONFIG,","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/scripts/lib/install/config.js#L51-L87","documentation":"loadInstallConfig() reads the config JSON and validates it with a schema validator (getValidator()). When validator(raw) returns false it throws this error including the resolved path and the formatted list of validation errors. It signals the config exists but its contents violate the expected schema.","triggerScenarios":"Calling loadInstallConfig() with a JSON file whose fields are missing, misspelled, or of the wrong type; supplying an install config from an older ECC version that predates new required fields; hand-editing the config and dropping a required key.","commonSituations":"Schema drift after upgrading ECC (config written for an older version); manual edits removing or renaming required keys; copying a config from another project with different shape; valid JSON but wrong structure (e.g. modules as a string instead of an array).","solutions":["Read the formatValidationErrors output in the message and fix each listed field in the config file.","Regenerate or restore the config from the repository's shipped default (manifests/install-components.json / install-modules.json area) and re-apply your customizations.","If you upgraded ECC, migrate your config to the current schema per the release notes rather than reusing the old file.","Validate the JSON parses and matches the expected shape with a quick node -e check before rerunning the installer."],"exampleFix":"// before (config.json)\n{ \"modules\": \"agents,skills\" }\n// after\n{ \"modules\": [\"agents\", \"skills\"] }","handlingStrategy":"validation","validationCode":"const raw = JSON.parse(fs.readFileSync(configPath, 'utf8'));\nconst required = ['modules'];\nconst missing = required.filter(k => !(k in raw));\nif (missing.length) throw new Error(`Install config missing fields: ${missing.join(', ')}`);","typeGuard":"function isValidInstallConfig(raw) {\n  return !!raw && typeof raw === 'object' && !Array.isArray(raw)\n    && Array.isArray(raw.modules)\n    && raw.modules.every(m => typeof m === 'string' && m.length > 0);\n}","tryCatchPattern":"try {\n  const config = loadInstallConfig(configPath);\n} catch (err) {\n  if (err.message.startsWith('Invalid install config')) {\n    console.error(err.message); // includes formatted validation errors\n    process.exitCode = 1;\n  } else throw err;\n}","preventionTips":["Start from the shipped default config and edit incrementally rather than writing one from scratch.","After upgrading ECC, diff your config against the current default schema before running installs.","Keep configs in version control so mistakes are diffable and reversible.","Run a JSON schema check or the repo's own validator on the config in CI."],"tags":["config","validation","schema"],"backgroundTag":"schema-validation-failed","analyzedSha":"8321021c54d670126ce3b2969d5deb880b4b0c2a","analyzedAt":"2026-09-16T10:08:13.343Z","contentChangedAt":"2026-09-16T10:08:13.343Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}