affaan-m/ECC · error · Error

Unknown install profile: ${profileId}

Error message

Unknown install profile: ${profileId}

What it means

Thrown by resolveInstallPlan() when profileId resolves to a value (either options.profileId or the target-default profile id) but manifests.profiles[profileId] is undefined. The profiles object is built from manifests/install-profiles.json — a miss means the profile was renamed, removed, or misspelled.

Source

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

      `Unknown install target: ${target}. Expected one of ${SUPPORTED_INSTALL_TARGETS.join(', ')}`
    );
  }

  const shouldUseTargetDefaultProfile = !requestedProfileId
    && explicitModuleIds.length === 0
    && includedComponentIds.length === 0;
  const targetDefaultProfileId = shouldUseTargetDefaultProfile
    ? getTargetDefaultProfileId(target, manifests)
    : null;
  const profileId = requestedProfileId || targetDefaultProfileId;
  const targetDefaultExclusions = targetDefaultProfileId
    ? getTargetDefaultExclusions(target, manifests)
    : [];

  if (profileId) {
    const profile = manifests.profiles[profileId];
    if (!profile) {
      throw new Error(`Unknown install profile: ${profileId}`);
    }
    requestedModuleIds.push(...profile.modules);
  }

  requestedModuleIds.push(...explicitModuleIds);
  requestedModuleIds.push(...expandComponentIdsToModuleIds(includedComponentIds, manifests));

  const excludedModuleIds = expandComponentIdsToModuleIds(excludedComponentIds, manifests);
  const excludedModuleOwners = new Map();
  for (const componentId of excludedComponentIds) {
    const component = manifests.componentsById.get(componentId);
    if (!component) {
      throw new Error(`Unknown install component: ${componentId}`);
    }
    for (const moduleId of component.modules) {
      const owners = excludedModuleOwners.get(moduleId) || [];
      owners.push(componentId);
      excludedModuleOwners.set(moduleId, owners);

View on GitHub (pinned to 01e15490f0)

Solutions

  1. Call listInstallProfiles() and use one of the returned ids.
  2. Verify manifests/install-profiles.json exists and is valid JSON at the configured repoRoot.
  3. If you want a target-default profile, pass only target and let resolveInstallPlan compute it.
  4. Drop profileId and pass moduleIds / includeComponentIds directly for a custom selection.

Example fix

// before
resolveInstallPlan({ target: 'claude', profileId: 'standard' });
// after
const profiles = listInstallProfiles().map(p => p.id);
const profileId = profiles.includes('standard') ? 'standard' : undefined;
resolveInstallPlan({ target: 'claude', profileId });
Defensive patterns

Strategy: validation

Validate before calling

const profiles = listInstallProfiles().map(p => p.id);
if (!profiles.includes(profileId)) {
  throw new Error(`Unknown profileId: ${profileId}. Valid: ${profiles.join(', ')}`);
}
resolveInstallPlan({ target, profileId });

Try / catch

try {
  return resolveInstallPlan({ target, profileId });
} catch (err) {
  if (/^Unknown install profile:/.test(err.message)) {
    return resolveInstallPlan({ target }); // fall back to target-default
  }
  throw err;
}

Prevention

When it happens

Trigger: Passing options.profileId = 'standard' when the file only defines 'baseline'; passing a profile from a different ECC version; passing the profile description text instead of the id; target's default profile id is stale because install-profiles.json was edited.

Common situations: A wrapper script hardcodes a profile name that drifted; the user typed the human description ('Standard install') instead of the id ('standard'); profiles JSON is corrupt and was parsed to an empty object.

Related errors


AI-assisted analysis of affaan-m/ECC@01e15490f0 (2026-08-13). Data as JSON: /api/errors/ec754645dee1493b. Report an issue: GitHub.