affaan-m/ECC · error

Unknown install profile

Error message

Unknown install profile: ${profileId}

What it means

If a profileId was resolved (from options or defaults), resolveInstallPlan looks it up in manifests.profiles. A missing entry throws this error, since the rest of plan resolution depends on the profile's module list. It protects against selecting install modules via a nonexistent profile.

Solutions

  1. Use a profile ID that exists in manifests/install-modules.json (check its profiles section)
  2. List available profiles from manifests.profiles and correct the ID
  3. Remove profileId and specify modules/components explicitly instead

Example fix

// before
resolveInstallPlan({ profileId: 'standard-plus' })
// after
resolveInstallPlan({ profileId: 'standard' })
Defensive patterns

Strategy: validation

Validate before calling

const manifests = loadInstallManifests();
if (options.profileId && !Object.hasOwn(manifests.profiles, options.profileId)) {
  throw new Error(`unknown profile; available: ${Object.keys(manifests.profiles).join(', ')}`);
}

Type guard

function isKnownProfile(id, manifests) {
  return typeof id === 'string' && Object.hasOwn(manifests.profiles, id);
}

Try / catch

try {
  const plan = resolveInstallPlan(options);
} catch (err) {
  if (err.message.startsWith('Unknown install profile:')) {
    console.error(`${err.message}`); process.exitCode = 2;
  } else throw err;
}

Prevention

When it happens

Trigger: resolveInstallPlan({ profileId: 'standard-plus' }) where 'standard-plus' is not a key in the profiles manifest loaded by loadInstallManifests().

Common situations: Typo in a --profile CLI flag, referencing a profile removed/renamed in manifests/install-modules.json, or a stale docs example.

Understand the failure class

Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.

Related errors


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

Appendix: source

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

      `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 8321021c54)