{"record":{"id":"ec754645dee1493b","repo":"affaan-m/ECC","slug":"unknown-install-profile-profileid","errorCode":null,"errorMessage":"Unknown install profile: ${profileId}","messagePattern":"Unknown install profile: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scripts/lib/install-manifests.js","lineNumber":574,"sourceCode":"      `Unknown install target: ${target}. Expected one of ${SUPPORTED_INSTALL_TARGETS.join(', ')}`\n    );\n  }\n\n  const shouldUseTargetDefaultProfile = !requestedProfileId\n    && explicitModuleIds.length === 0\n    && includedComponentIds.length === 0;\n  const targetDefaultProfileId = shouldUseTargetDefaultProfile\n    ? getTargetDefaultProfileId(target, manifests)\n    : null;\n  const profileId = requestedProfileId || targetDefaultProfileId;\n  const targetDefaultExclusions = targetDefaultProfileId\n    ? getTargetDefaultExclusions(target, manifests)\n    : [];\n\n  if (profileId) {\n    const profile = manifests.profiles[profileId];\n    if (!profile) {\n      throw new Error(`Unknown install profile: ${profileId}`);\n    }\n    requestedModuleIds.push(...profile.modules);\n  }\n\n  requestedModuleIds.push(...explicitModuleIds);\n  requestedModuleIds.push(...expandComponentIdsToModuleIds(includedComponentIds, manifests));\n\n  const excludedModuleIds = expandComponentIdsToModuleIds(excludedComponentIds, manifests);\n  const excludedModuleOwners = new Map();\n  for (const componentId of excludedComponentIds) {\n    const component = manifests.componentsById.get(componentId);\n    if (!component) {\n      throw new Error(`Unknown install component: ${componentId}`);\n    }\n    for (const moduleId of component.modules) {\n      const owners = excludedModuleOwners.get(moduleId) || [];\n      owners.push(componentId);\n      excludedModuleOwners.set(moduleId, owners);","sourceCodeStart":556,"sourceCodeEnd":592,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/scripts/lib/install-manifests.js#L556-L592","documentation":"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.","triggerScenarios":"resolveInstallPlan({ profileId: 'standard-plus' }) where 'standard-plus' is not a key in the profiles manifest loaded by loadInstallManifests().","commonSituations":"Typo in a --profile CLI flag, referencing a profile removed/renamed in manifests/install-modules.json, or a stale docs example.","solutions":["Use a profile ID that exists in manifests/install-modules.json (check its profiles section)","List available profiles from manifests.profiles and correct the ID","Remove profileId and specify modules/components explicitly instead"],"exampleFix":"// before\nresolveInstallPlan({ profileId: 'standard-plus' })\n// after\nresolveInstallPlan({ profileId: 'standard' })","handlingStrategy":"validation","validationCode":"const manifests = loadInstallManifests();\nif (options.profileId && !Object.hasOwn(manifests.profiles, options.profileId)) {\n  throw new Error(`unknown profile; available: ${Object.keys(manifests.profiles).join(', ')}`);\n}","typeGuard":"function isKnownProfile(id, manifests) {\n  return typeof id === 'string' && Object.hasOwn(manifests.profiles, id);\n}","tryCatchPattern":"try {\n  const plan = resolveInstallPlan(options);\n} catch (err) {\n  if (err.message.startsWith('Unknown install profile:')) {\n    console.error(`${err.message}`); process.exitCode = 2;\n  } else throw err;\n}","preventionTips":["List profiles from manifests/install-modules.json in --help","Validate profile IDs after any manifest refactor","Avoid hardcoding profile IDs in scripts; read them from the manifest"],"tags":["validation","config","manifest"],"backgroundTag":"record-not-found","analyzedSha":"8321021c54d670126ce3b2969d5deb880b4b0c2a","analyzedAt":"2026-09-16T10:08:13.343Z","contentChangedAt":"2026-09-16T10:08:13.343Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}