{"record":{"id":"6f6e60a2fee9d28e","repo":"angular/angular-cli","slug":"unknown-collection-name-6f6e60","errorCode":null,"errorMessage":"Unknown collection \"${name}\".","messagePattern":"Unknown collection \"(.+?)\"\\.","errorType":"exception","errorClass":"UnknownCollectionException","httpStatus":null,"severity":"error","filePath":"packages/angular_devkit/schematics/tools/fallback-engine-host.ts","lineNumber":60,"sourceCode":"  addHost<CollectionT extends object, SchematicT extends object>(\n    host: EngineHost<CollectionT, SchematicT>,\n  ): void {\n    this._hosts.push(host);\n  }\n\n  createCollectionDescription(\n    name: string,\n    requester?: CollectionDescription<{}>,\n  ): CollectionDescription<FallbackCollectionDescription> {\n    for (const host of this._hosts) {\n      try {\n        const description = host.createCollectionDescription(name, requester);\n\n        return { name, host, description };\n      } catch (_) {}\n    }\n\n    throw new UnknownCollectionException(name);\n  }\n\n  createSchematicDescription(\n    name: string,\n    collection: CollectionDescription<FallbackCollectionDescription>,\n  ): SchematicDescription<FallbackCollectionDescription, FallbackSchematicDescription> | null {\n    const description = collection.host.createSchematicDescription(name, collection.description);\n    if (!description) {\n      return null;\n    }\n\n    return { name, collection, description };\n  }\n\n  getSchematicRuleFactory<OptionT extends object>(\n    schematic: SchematicDescription<FallbackCollectionDescription, FallbackSchematicDescription>,\n    collection: CollectionDescription<FallbackCollectionDescription>,\n  ): RuleFactory<OptionT> {","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/angular/angular-cli/blob/bb72145f9ab45aee29f523236b3a25cd0813a841/packages/angular_devkit/schematics/tools/fallback-engine-host.ts#L42-L78","documentation":"FallbackEngineHost tries each registered fallback collection host to resolve a collection by name; if every host fails to create a description, it throws UnknownCollectionException. It means no fallback host could locate a collection with that name.","triggerScenarios":"createCollectionDescription(name) with a collection name that isn't resolvable by any fallback host — not installed in node_modules, not a built-in, wrong name/case, or a broken package whose own resolution threw.","commonSituations":"Referencing a schematic collection that isn't a devDependency (e.g. '@schematics/x' not installed); typos in collection names; running custom schematics that reference internal/renamed collections after a version upgrade.","solutions":["Install the collection package (npm i -D @schematics/<name> or the specific package)","Check the collection name spelling and casing in the execute() call","Verify the package exports a valid collection.json (check its package.json 'schematics' field)","If a package exists but its description creation failed (swallowed by the catch), inspect its collection.json for corruption or schema mismatch"],"exampleFix":"// before\nawait workflow.execute({ collection: '@schematics/anguler', schematic: 'component' }); // typo, not installed\n// after\n// npm install --save-dev @schematics/angular\nawait workflow.execute({ collection: '@schematics/angular', schematic: 'component' });","handlingStrategy":"try-catch","validationCode":"import { resolve } from 'path';\nfunction collectionIsAvailable(name: string): boolean {\n  try {\n    require.resolve(`${name}/collection.json`);\n    return true;\n  } catch { return false; }\n}","typeGuard":null,"tryCatchPattern":"try {\n  await workflow.execute({ collection: name, schematic: schematicName });\n} catch (e) {\n  if (/Unknown collection/.test(String(e))) {\n    console.error(`Collection \"${name}\" not found. Install it: npm i -D ${name}`);\n    process.exitCode = 1;\n  } else throw e;\n}","preventionTips":["Add every referenced schematic collection as an explicit devDependency","Verify collection names with require.resolve before executing","Watch for renamed/moved collections across devkit major upgrades","Run a dry-run resolution of all collections in CI"],"tags":["schematics","collection-not-found","angular","npm"],"backgroundTag":"unknown-collection","analyzedSha":"bb72145f9ab45aee29f523236b3a25cd0813a841","analyzedAt":"2026-08-30T02:47:34.745Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}