{"record":{"id":"f48e9d1b0dfcd13a","repo":"angular/angular-cli","slug":"cannot-load-builder-for-builderinfo-json-stringi","errorCode":null,"errorMessage":"Cannot load builder for builderInfo ${JSON.stringify(info, null, 2)}","messagePattern":"Cannot load builder for builderInfo (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/angular_devkit/architect/src/architect.ts","lineNumber":100,"sourceCode":"\n          return { ...message, value: { ...v, options: data } } as JobInboundMessage<BuilderInput>;\n        } else {\n          return message as JobInboundMessage<BuilderInput>;\n        }\n      }),\n      // Using a share replay because the job might be synchronously sending input, but\n      // asynchronously listening to it.\n      shareReplay(1),\n    );\n\n    // Make an inboundBus that completes instead of erroring out.\n    // We'll merge the errors into the output instead.\n    const inboundBus = onErrorResumeNext(inboundBusWithInputValidation);\n\n    const output = from(host.loadBuilder(info)).pipe(\n      concatMap((builder) => {\n        if (builder === null) {\n          throw new Error(`Cannot load builder for builderInfo ${JSON.stringify(info, null, 2)}`);\n        }\n\n        return builder.handler(argument, { ...context, inboundBus }).pipe(\n          map((output) => {\n            if (output.kind === JobOutboundMessageKind.Output) {\n              // Add target to it.\n              return {\n                ...output,\n                value: {\n                  ...output.value,\n                  ...(target ? { target } : 0),\n                } as unknown as json.JsonObject,\n              };\n            } else {\n              return output;\n            }\n          }),\n        );","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/angular/angular-cli/blob/bb72145f9ab45aee29f523236b3a25cd0813a841/packages/angular_devkit/architect/src/architect.ts#L82-L118","documentation":"When Architect schedules jobs it loads the builder info via host.loadBuilder(info). If the host returns null/undefined for a builderInfo, the job pipeline throws this error carrying the serialized builderInfo for diagnosis.","triggerScenarios":"Scheduling a target or builder whose builder info resolves (name exists) but whose implementation cannot be loaded — e.g. loadBuilder returns null because the import fails or the module is missing.","commonSituations":"Corrupted or partially installed node_modules; builder implementation file missing from a published package; broken ESM/CJS export causing the loader to return null.","solutions":["Reinstall dependencies (delete node_modules and lockfile, run npm install/yarn/pnpm install)","Verify the builder's implementation path in builders.json points to an existing, correctly-exported module","Rebuild the builder package and ensure the implementation file is included in the published bundle","Check the exact builderInfo in the message to see which package is failing"],"exampleFix":"// package.json files field before (missing implementation)\n\"files\": [\"builders.json\"]\n// after\n\"files\": [\"builders.json\", \"dist/impl.js\"]","handlingStrategy":"try-catch","validationCode":"const info = await host.resolveBuilder(builderName);\nif (!info) throw new Error(`Cannot resolve builder ${builderName}`);\nconst impl = await host.loadBuilder(info);\nif (!impl) throw new Error(`Builder module missing for ${builderName}; reinstall the package`);","typeGuard":"function isLoadableBuilderInfo(info) {\n  return !!info && !!info.info && typeof info.info.implementation === 'string';\n}","tryCatchPattern":"try {\n  const run = await architect.scheduleTarget(target, options);\n} catch (e) {\n  if (e.message.startsWith('Cannot load builder for builderInfo')) {\n    console.error('Builder resolved but module missing/broken — reinstall the builder package and check its files field');\n  }\n  throw e;\n}","preventionTips":["Keep node_modules healthy; do a clean install after upgrading the CLI","Ensure builder packages ship their implementation files (files/pack tests)","Add a preflight loadBuilder check in custom tooling before scheduling"],"tags":["angular","architect","builder-loading","job-scheduler"],"backgroundTag":"cannot-load-builder","analyzedSha":"bb72145f9ab45aee29f523236b3a25cd0813a841","analyzedAt":"2026-08-30T02:47:34.745Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}