angular/angular-cli · error

Cannot load builder for builderInfo ${JSON.stringify(info, n

Error message

Cannot load builder for builderInfo ${JSON.stringify(info, null, 2)}

What it means

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.

Source

Thrown at packages/angular_devkit/architect/src/architect.ts:100

          return { ...message, value: { ...v, options: data } } as JobInboundMessage<BuilderInput>;
        } else {
          return message as JobInboundMessage<BuilderInput>;
        }
      }),
      // Using a share replay because the job might be synchronously sending input, but
      // asynchronously listening to it.
      shareReplay(1),
    );

    // Make an inboundBus that completes instead of erroring out.
    // We'll merge the errors into the output instead.
    const inboundBus = onErrorResumeNext(inboundBusWithInputValidation);

    const output = from(host.loadBuilder(info)).pipe(
      concatMap((builder) => {
        if (builder === null) {
          throw new Error(`Cannot load builder for builderInfo ${JSON.stringify(info, null, 2)}`);
        }

        return builder.handler(argument, { ...context, inboundBus }).pipe(
          map((output) => {
            if (output.kind === JobOutboundMessageKind.Output) {
              // Add target to it.
              return {
                ...output,
                value: {
                  ...output.value,
                  ...(target ? { target } : 0),
                } as unknown as json.JsonObject,
              };
            } else {
              return output;
            }
          }),
        );

View on GitHub (pinned to bb72145f9a)

Solutions

  1. Reinstall dependencies (delete node_modules and lockfile, run npm install/yarn/pnpm install)
  2. Verify the builder's implementation path in builders.json points to an existing, correctly-exported module
  3. Rebuild the builder package and ensure the implementation file is included in the published bundle
  4. Check the exact builderInfo in the message to see which package is failing

Example fix

// package.json files field before (missing implementation)
"files": ["builders.json"]
// after
"files": ["builders.json", "dist/impl.js"]
Defensive patterns

Strategy: try-catch

Validate before calling

const info = await host.resolveBuilder(builderName);
if (!info) throw new Error(`Cannot resolve builder ${builderName}`);
const impl = await host.loadBuilder(info);
if (!impl) throw new Error(`Builder module missing for ${builderName}; reinstall the package`);

Type guard

function isLoadableBuilderInfo(info) {
  return !!info && !!info.info && typeof info.info.implementation === 'string';
}

Try / catch

try {
  const run = await architect.scheduleTarget(target, options);
} catch (e) {
  if (e.message.startsWith('Cannot load builder for builderInfo')) {
    console.error('Builder resolved but module missing/broken — reinstall the builder package and check its files field');
  }
  throw e;
}

Prevention

When it happens

Trigger: 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.

Common situations: Corrupted or partially installed node_modules; builder implementation file missing from a published package; broken ESM/CJS export causing the loader to return null.

Related errors


AI-assisted analysis of angular/angular-cli@bb72145f9a (2026-08-30). Data as JSON: /api/errors/f48e9d1b0dfcd13a. Report an issue: GitHub.