{"record":{"id":"d43bc6fecbeea375","repo":"angular/angular-cli","slug":"could-not-find-the-schema-for-builder","errorCode":null,"errorMessage":"Could not find the schema for builder ","messagePattern":"Could not find the schema for builder ","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/angular_devkit/architect/node/node-modules-architect-host.ts","lineNumber":204,"sourceCode":"        (seenBuilders ?? new Set()).add(builderStr),\n      );\n    }\n\n    // Determine builder implementation path (relative within package only)\n    const implementationPath = builder.implementation && path.normalize(builder.implementation);\n    if (!implementationPath) {\n      throw new Error('Could not find the implementation for builder ' + builderStr);\n    }\n    if (path.isAbsolute(implementationPath) || implementationPath.startsWith('..')) {\n      throw new Error(\n        `Package \"${packageName}\" has an invalid builder implementation path: \"${builderName}\" --> \"${builder.implementation}\"`,\n      );\n    }\n\n    // Determine builder option schema path (relative within package only)\n    let schemaPath = builder.schema;\n    if (!schemaPath) {\n      throw new Error('Could not find the schema for builder ' + builderStr);\n    }\n    if (path.isAbsolute(schemaPath) || path.normalize(schemaPath).startsWith('..')) {\n      throw new Error(\n        `Package \"${packageName}\" has an invalid builder schema path: \"${builderName}\" --> \"${builder.schema}\"`,\n      );\n    }\n\n    // The file could be either a package reference or in the local manifest directory.\n    if (schemaPath.startsWith('.')) {\n      schemaPath = path.join(buildersManifestDirectory, schemaPath);\n    } else {\n      const manifestRequire = createRequire(buildersManifestDirectory + '/');\n      schemaPath = manifestRequire.resolve(schemaPath);\n    }\n\n    const schemaText = readFileSync(schemaPath, 'utf-8');\n\n    return Promise.resolve({","sourceCodeStart":186,"sourceCodeEnd":222,"githubUrl":"https://github.com/angular/angular-cli/blob/bb72145f9ab45aee29f523236b3a25cd0813a841/packages/angular_devkit/architect/node/node-modules-architect-host.ts#L186-L222","documentation":"A builder manifest entry must include a 'schema' path to the JSON options schema used for validating/deriving target options. resolveBuilder throws when the entry lacks a 'schema' value.","triggerScenarios":"A builders.json entry like {\"implementation\": \"./impl.js\"} without 'schema'; schema field removed or mistyped while editing a manifest.","commonSituations":"Authoring custom builders and forgetting the schema; trimming manifest entries; alias chains resolving to a partially defined entry.","solutions":["Add a 'schema' field pointing at a relative JSON schema file in the manifest entry.","Create the schema file if it doesn't exist and reference it.","Publish a fixed version of the builder package."],"exampleFix":"// before (builders.json)\n\"my-builder\": {\"implementation\": \"./impl.js\"}\n// after\n\"my-builder\": {\"implementation\": \"./impl.js\", \"schema\": \"./schema.json\"}","handlingStrategy":"validation","validationCode":"const schema = require(`${packageName}/builders.json`).builders?.[builderName]?.schema;\nif (!schema) throw new Error(`Builder \"${packageName}:${builderName}\" is missing a schema path.`);","typeGuard":"const hasSchema = (b) => typeof b === 'object' && b !== null && typeof b.schema === 'string' && b.schema.length > 0;","tryCatchPattern":"try { await host.resolveBuilder(builderStr); } catch (e) { if (String(e.message).includes('Could not find the schema for builder')) { /* add the 'schema' field to the manifest entry */ } else throw e; }","preventionTips":["Always author a JSON schema for custom builder options.","Validate manifests against BuilderSchema in CI.","Keep manifest entries complete: implementation, schema, description."],"tags":["angular","builder","schema"],"backgroundTag":"incomplete-builder-manifest-entry","analyzedSha":"bb72145f9ab45aee29f523236b3a25cd0813a841","analyzedAt":"2026-08-30T02:47:34.745Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}