{"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":"Error","httpStatus":null,"severity":"error","filePath":"scripts/lib/install/config.js","lineNumber":67,"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":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/scripts/lib/install/config.js#L49-L85","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before (ecc-install.json)\n{ \"target\": \"Claude\", \"modules\": \"core\" }\n\n// after\n{ \"target\": \"claude\", \"modules\": [\"core\"] }","handlingStrategy":"validation","validationCode":"const Ajv = require('ajv');\nconst schema = require(path.join(repoRoot, 'schemas/ecc-install-config.schema.json'));\nconst validate = new Ajv({ allErrors: true }).compile(schema);\nconst raw = JSON.parse(fs.readFileSync(configPath, 'utf8'));\nif (!validate(raw)) {\n  console.error('Schema violations:', validate.errors);\n}","typeGuard":"function isInstallConfigShape(v) {\n  return Boolean(\n    v && typeof v === 'object'\n    && typeof v.target === 'string'\n    && Array.isArray(v.modules)\n  );\n}","tryCatchPattern":"try {\n  loadInstallConfig(p);\n} catch (err) {\n  if (/Invalid install config/.test(err.message)) {\n    console.error('Schema violations:', err.message);\n  }\n  throw err;\n}","preventionTips":["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."],"tags":["install-config","json-schema","validation"],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}