{"record":{"id":"a2c313c63a0032c2","repo":"angular/angular-cli","slug":"no-builder-were-found-for-target-targetstringfro","errorCode":null,"errorMessage":"No builder were found for target ${targetStringFromTarget(target)}.","messagePattern":"No builder were found for target (.+?)\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/angular_devkit/architect/src/architect.ts","lineNumber":305,"sourceCode":"        if (options === null) {\n          throw new Error(`Invalid target: ${JSON.stringify(target)}.`);\n        }\n\n        return options;\n      });\n    },\n    {\n      name: '..getProjectMetadata',\n    },\n  );\n}\n\nfunction _getBuilderNameForTargetFactory(host: ArchitectHost) {\n  return createJobHandler<Target, never, string>(\n    async (target) => {\n      const builderName = await host.getBuilderNameForTarget(target);\n      if (!builderName) {\n        throw new Error(`No builder were found for target ${targetStringFromTarget(target)}.`);\n      }\n\n      return builderName;\n    },\n    {\n      name: '..getBuilderNameForTarget',\n    },\n  );\n}\n\nfunction _validateOptionsFactory(host: ArchitectHost, registry: json.schema.SchemaRegistry) {\n  return createJobHandler<[string, json.JsonObject], never, json.JsonObject>(\n    async ([builderName, options]) => {\n      // Get option schema from the host.\n      const builderInfo = await host.resolveBuilder(builderName);\n      if (!builderInfo) {\n        throw new Error(`No builder info were found for builder ${JSON.stringify(builderName)}.`);\n      }","sourceCodeStart":287,"sourceCodeEnd":323,"githubUrl":"https://github.com/angular/angular-cli/blob/bb72145f9ab45aee29f523236b3a25cd0813a841/packages/angular_devkit/architect/src/architect.ts#L287-L323","documentation":"The ..getBuilderNameForTarget job handler asks the host which builder executes a target. If the host returns an empty/falsy builder name, this error reports that no builder could be resolved for the target.","triggerScenarios":"Calling architect.getBuilderNameForTarget(target) (or scheduling a target) where angular.json defines the target without a 'builder' field or the host lookup fails.","commonSituations":"angular.json targets missing the builder key after manual edits or migrations; targets defined only as configurations; custom tooling writing incomplete workspace configs.","solutions":["Open angular.json and ensure the target entry has a \"builder\": \"package:builder\" field","Fix the target/project name (the message shows the resolved target string)","Re-run `ng generate` or the migration tool to repair a malformed workspace config","Check the custom ArchitectHost implementation if you supply your own getBuilderNameForTarget"],"exampleFix":"// angular.json before\n\"build\": { \"options\": { ... } }\n// after\n\"build\": { \"builder\": \"@angular-devkit/build-angular:browser\", \"options\": { ... } }","handlingStrategy":"validation","validationCode":"const t = ws.projects?.[target.project]?.architect?.[target.target];\nif (!t?.builder) throw new Error(`Target ${target.project}:${target.target} has no builder configured`);","typeGuard":"function hasBuilderConfigured(ws, target) {\n  return typeof ws?.projects?.[target?.project]?.architect?.[target?.target]?.builder === 'string';\n}","tryCatchPattern":"try {\n  const builderName = await architect.getBuilderNameForTarget(target);\n} catch (e) {\n  if (e.message.startsWith('No builder were found for target')) {\n    console.error('Add a \"builder\" field to the target in angular.json');\n  }\n  throw e;\n}","preventionTips":["Never hand-edit angular.json targets without the builder field","Run `ng build`/`ng lint` on CI to catch malformed workspace configs early","Use schematics/migrations to modify angular.json instead of manual edits"],"tags":["angular","architect","builder-lookup","workspace-config"],"backgroundTag":"no-builder-for-target","analyzedSha":"bb72145f9ab45aee29f523236b3a25cd0813a841","analyzedAt":"2026-08-30T02:47:34.745Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}