{"record":{"id":"cc9f4f94320d398f","repo":"affaan-m/ECC","slug":"install-manifests-not-found-under-reporoot","errorCode":null,"errorMessage":"Install manifests not found under ${repoRoot}","messagePattern":"Install manifests not found under (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/lib/install-manifests.js","lineNumber":288,"sourceCode":"  return SUPPORTED_INSTALL_TARGETS.filter(target => (\n    modules.every(module => Array.isArray(module.targets) && module.targets.includes(target))\n  ));\n}\n\nfunction getManifestPaths(repoRoot = DEFAULT_REPO_ROOT) {\n  return {\n    modulesPath: path.join(repoRoot, 'manifests', 'install-modules.json'),\n    profilesPath: path.join(repoRoot, 'manifests', 'install-profiles.json'),\n    componentsPath: path.join(repoRoot, 'manifests', 'install-components.json'),\n  };\n}\n\nfunction loadInstallManifests(options = {}) {\n  const repoRoot = options.repoRoot || DEFAULT_REPO_ROOT;\n  const { modulesPath, profilesPath, componentsPath } = getManifestPaths(repoRoot);\n\n  if (!fs.existsSync(modulesPath) || !fs.existsSync(profilesPath)) {\n    throw new Error(`Install manifests not found under ${repoRoot}`);\n  }\n\n  const modulesData = readJson(modulesPath, 'install-modules.json');\n  const profilesData = readJson(profilesPath, 'install-profiles.json');\n  const componentsData = fs.existsSync(componentsPath)\n    ? readJson(componentsPath, 'install-components.json')\n    : { version: null, components: [] };\n  const modules = Array.isArray(modulesData.modules) ? modulesData.modules.slice() : [];\n  const profiles = profilesData && typeof profilesData.profiles === 'object'\n    ? profilesData.profiles\n    : {};\n  const components = Array.isArray(componentsData.components) ? componentsData.components.slice() : [];\n\n  addSyntheticSkillComponents({ repoRoot, modules, components });\n\n  for (const module of modules) {\n    readModuleTargetsOrThrow(module);\n  }","sourceCodeStart":270,"sourceCodeEnd":306,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/scripts/lib/install-manifests.js#L270-L306","documentation":"loadInstallManifests checks for the existence of install-modules.json and install-profiles.json under <repoRoot>/manifests/ and throws if either is missing. install-components.json is optional, but modules and profiles are mandatory baseline inputs.","triggerScenarios":"Calling loadInstallManifests (or any API that calls it — listInstallComponents, resolveInstallModules, createManifestInstallPlan) with a repoRoot that lacks manifests/install-modules.json or manifests/install-profiles.json. Also triggered when DEFAULT_REPO_ROOT is wrong because the installer is invoked from outside the repo.","commonSituations":"Shallow/partial clone excluded manifests/; manifests/ deleted or not committed; installer invoked from /tmp or a non-repo directory so DEFAULT_REPO_ROOT (__dirname/../..) resolves to a path without manifests; wrong --repoRoot flag value; extracted tarball missing the manifests folder.","solutions":["Confirm the repoRoot in the error and verify `ls <repoRoot>/manifests/` shows install-modules.json and install-profiles.json.","If missing, restore from git: `git checkout HEAD -- manifests/` or re-clone with full history.","Run the installer from the repository root, or pass --repoRoot explicitly pointing at the real repo.","If packaging a tarball, ensure manifests/ is included."],"exampleFix":"// before: invoked from /tmp, DEFAULT_REPO_ROOT resolves there\n// after:\ncd /path/to/ECC\n./install.sh --target claude\n# or: ./install.sh --target claude --repoRoot /path/to/ECC","handlingStrategy":"validation","validationCode":"const fs = require('fs');\nconst path = require('path');\nfunction manifestsExist(repoRoot) {\n  return fs.existsSync(path.join(repoRoot, 'manifests', 'install-modules.json'))\n      && fs.existsSync(path.join(repoRoot, 'manifests', 'install-profiles.json'));\n}\n// before invoking installer: assert manifestsExist(repoRoot)","typeGuard":"function hasRequiredManifests(repoRoot) {\n  return manifestsExist(repoRoot);\n}","tryCatchPattern":"try {\n  loadInstallManifests({ repoRoot });\n} catch (err) {\n  if (err.message.startsWith('Install manifests not found under')) {\n    // restore manifests/ from git or fix repoRoot, then retry\n  } else throw err;\n}","preventionTips":["Run the installer from the actual repo root.","Pass --repoRoot explicitly when invoking from elsewhere.","Ensure tarballs and Docker images include manifests/.","Add a smoke check in CI that asserts manifests exist before any install step."],"tags":["manifest","filesystem","install","paths"],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}