affaan-m/ECC · critical

Install manifests not found under

Error message

Install manifests not found under ${repoRoot}

What it means

Thrown by loadInstallManifests when the required manifest files (install-modules.json or install-profiles.json) do not exist under the resolved repo root. getManifestPaths(repoRoot) derives expected locations; fs.existsSync is checked before any reads. It signals that the install-manifest system cannot be bootstrapped in this checkout.

Solutions

  1. Verify manifests/install-modules.json and manifests/install-profiles.json exist at the repo root; restore them from git (git checkout -- manifests/).
  2. Run the script from the repository root, or pass the correct options.repoRoot.
  3. If invoking from an installed package, ensure manifests are included in the package files allowlist and reinstall.
  4. For a fresh clone, re-clone the full repository (avoid shallow/exported copies missing manifests/).
  5. Confirm path resolution by logging getManifestPaths(repoRoot) if a custom repoRoot is used.

Example fix

// before
loadInstallManifests({ repoRoot: './scripts' }) // manifests not here

// after
loadInstallManifests({ repoRoot: '/path/to/ECC' }) // contains manifests/
Defensive patterns

Strategy: try-catch

Validate before calling

const fs = require('fs');
const path = require('path');
const repoRoot = process.cwd();
const ok = fs.existsSync(path.join(repoRoot, 'manifests/install-modules.json')) &&
  fs.existsSync(path.join(repoRoot, 'manifests/install-profiles.json'));
if (!ok) throw new Error(`Run from ECC repo root; manifests missing under ${repoRoot}`);

Try / catch

try {
  const manifests = loadInstallManifests({ repoRoot });
} catch (err) {
  if (err.message.startsWith('Install manifests not found under')) {
    console.error(`Manifests missing at ${repoRoot}. Run from the ECC repo root or restore manifests/.`);
    process.exit(1);
  }
  throw err;
}

Prevention

When it happens

Trigger: Calling loadInstallManifests() (or consumers like the manifests CLI or runTests) when manifests/install-modules.json or manifests/install-profiles.json is missing, or when passing options.repoRoot pointing at a directory without them.

Common situations: Running the script from a shallow/partial clone or exported archive without manifests/; invoking from a subdirectory with an incorrect repoRoot override; deleting or moving manifests during refactoring; calling the library from a package installed without its files field including manifests/.

Understand the failure class

Background: "Config file not found": what it means and how to fix it in docker-sync, Maven, Vagrant, Turborepo and other tools — this error's family across 60 libraries.

Related errors


AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16). Data as JSON: /api/errors/cc9f4f94320d398f. Report an issue: GitHub.

Appendix: source

Thrown at scripts/lib/install-manifests.js:308

  return SUPPORTED_INSTALL_TARGETS.filter(target => (
    modules.every(module => Array.isArray(module.targets) && module.targets.includes(target))
  ));
}

function getManifestPaths(repoRoot = DEFAULT_REPO_ROOT) {
  return {
    modulesPath: path.join(repoRoot, 'manifests', 'install-modules.json'),
    profilesPath: path.join(repoRoot, 'manifests', 'install-profiles.json'),
    componentsPath: path.join(repoRoot, 'manifests', 'install-components.json'),
  };
}

function loadInstallManifests(options = {}) {
  const repoRoot = options.repoRoot || DEFAULT_REPO_ROOT;
  const { modulesPath, profilesPath, componentsPath } = getManifestPaths(repoRoot);

  if (!fs.existsSync(modulesPath) || !fs.existsSync(profilesPath)) {
    throw new Error(`Install manifests not found under ${repoRoot}`);
  }

  const modulesData = readJson(modulesPath, 'install-modules.json');
  const profilesData = readJson(profilesPath, 'install-profiles.json');
  const componentsData = fs.existsSync(componentsPath)
    ? readJson(componentsPath, 'install-components.json')
    : { version: null, components: [] };
  const modules = Array.isArray(modulesData.modules) ? modulesData.modules.slice() : [];
  const profiles = profilesData && typeof profilesData.profiles === 'object'
    ? profilesData.profiles
    : {};
  const components = Array.isArray(componentsData.components) ? componentsData.components.slice() : [];

  addSyntheticSkillComponents({ repoRoot, modules, components });

  for (const module of modules) {
    readModuleTargetsOrThrow(module);
  }

View on GitHub (pinned to 8321021c54)