angular/angular-cli · error

Cannot find builder ${JSON.stringify(builderStr)}.

Error message

Cannot find builder ${JSON.stringify(builderStr)}.

What it means

After loading the package's builders manifest, resolveBuilder looks up the builder by name and throws when the manifest has no entry for it. The package has builders, but not the one requested.

Source

Thrown at packages/angular_devkit/architect/node/node-modules-architect-host.ts:178

    }

    let buildersManifestPath = path.normalize(buildersManifestRawPath);
    if (path.isAbsolute(buildersManifestRawPath) || buildersManifestRawPath.startsWith('..')) {
      throw new Error(
        `Package "${packageName}" has an invalid builders manifest path: "${buildersManifestRawPath}"`,
      );
    }

    buildersManifestPath = path.join(path.dirname(packageJsonPath), buildersManifestPath);
    const buildersManifest = JSON.parse(
      readFileSync(buildersManifestPath, 'utf-8'),
    ) as BuilderSchema;
    const buildersManifestDirectory = path.dirname(buildersManifestPath);

    // Attempt to locate an entry for the specified builder by name
    const builder = buildersManifest.builders?.[builderName];
    if (!builder) {
      throw new Error(`Cannot find builder ${JSON.stringify(builderStr)}.`);
    }

    // Resolve alias reference if entry is a string
    if (typeof builder === 'string') {
      return this.resolveBuilder(
        builder,
        path.dirname(packageJsonPath),
        (seenBuilders ?? new Set()).add(builderStr),
      );
    }

    // Determine builder implementation path (relative within package only)
    const implementationPath = builder.implementation && path.normalize(builder.implementation);
    if (!implementationPath) {
      throw new Error('Could not find the implementation for builder ' + builderStr);
    }
    if (path.isAbsolute(implementationPath) || implementationPath.startsWith('..')) {
      throw new Error(

View on GitHub (pinned to bb72145f9a)

Solutions

  1. Check the package's builders.json for valid builder names and use one of them.
  2. Update angular.json to the renamed builder (e.g. ':browser' -> ':application').
  3. Downgrade or pin the builder package to a version that still contains the builder.

Example fix

// before
"builder": "@angular-devkit/build-angular:dev-server-build"
// after
"builder": "@angular-devkit/build-angular:dev-server"
Defensive patterns

Strategy: validation

Validate before calling

const manifest = require(require.resolve(`${packageName}/builders.json`, { paths: [process.cwd()] }));
if (!(builderName in manifest.builders)) throw new Error(`Builder "${builderName}" not found in ${packageName}. Available: ${Object.keys(manifest.builders).join(', ')}`);

Try / catch

try { await host.resolveBuilder(builderStr); } catch (e) { if (String(e.message).startsWith('Cannot find builder')) { /* switch to an existing builder name from the manifest */ } else throw e; }

Prevention

When it happens

Trigger: Using 'package:builderName' where builderName is absent from builders.json 'builders' map, e.g. after a builder was renamed (browser -> application) or misspelled.

Common situations: Upgrading @angular-devkit/build-angular where a builder was replaced/renamed; typo in builder name; copying builder names between packages.

Related errors


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