angular/angular-cli · error
No builder name specified.
Error message
No builder name specified.
What it means
Builder identifiers must have the form 'package:builder'. resolveBuilder splits the string on ':' and throws when there is no builder name part after the colon.
Source
Thrown at packages/angular_devkit/architect/node/node-modules-architect-host.ts:148
* clause. This should throw if no builder can be found. The dynamic import will throw if
* it is unsupported.
* @param builderStr The name of the builder to be used.
* @returns All the info needed for the builder itself.
*/
resolveBuilder(
builderStr: string,
basePath: string = this._root,
seenBuilders?: Set<string>,
): Promise<NodeModulesBuilderInfo> {
if (seenBuilders?.has(builderStr)) {
throw new Error(
'Circular builder alias references detected: ' + [...seenBuilders, builderStr],
);
}
const [packageName, builderName] = builderStr.split(':', 2);
if (!builderName) {
throw new Error('No builder name specified.');
}
// Resolve and load the builders manifest from the package's `builders` field, if present
const packageJsonPath = localRequire.resolve(packageName + '/package.json', {
paths: [basePath],
});
const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8')) as { builders?: string };
const buildersManifestRawPath = packageJson['builders'];
if (!buildersManifestRawPath) {
throw new Error(`Package ${JSON.stringify(packageName)} has no builders defined.`);
}
let buildersManifestPath = path.normalize(buildersManifestRawPath);
if (path.isAbsolute(buildersManifestRawPath) || buildersManifestRawPath.startsWith('..')) {
throw new Error(
`Package "${packageName}" has an invalid builders manifest path: "${buildersManifestRawPath}"`,
);View on GitHub (pinned to bb72145f9a)
Solutions
- Set the full 'package:builder' identifier in angular.json's builder field, e.g. '@angular-devkit/build-angular:application'.
- Add the missing ':builderName' to the string passed to resolveBuilder.
Example fix
// before (angular.json) "builder": "@angular-devkit/build-angular" // after "builder": "@angular-devkit/build-angular:browser"
Defensive patterns
Strategy: validation
Validate before calling
if (!/^[^:]+:[^:]+$/.test(builderStr)) throw new Error(`Builder "${builderStr}" must be in 'package:builder' format.`); Type guard
const isValidBuilderId = (s) => typeof s === 'string' && /^[^:]+:[^:]+$/.test(s);
Try / catch
try { await host.resolveBuilder(builderStr); } catch (e) { if (e.message === 'No builder name specified.') { /* correct the builder identifier to include ':builderName' */ } else throw e; } Prevention
- Always use fully-qualified 'package:builder' identifiers in angular.json.
- Use editor autocomplete/validation for the builder field.
- Add a JSON schema check for angular.json in CI.
When it happens
Trigger: Passing a builder string like 'my-package' (no ':builderName' suffix) to resolveBuilder or setting an angular.json target's 'builder' field to a bare package name.
Common situations: Incomplete migration of angular.json after changing a builder; assuming builder name is optional; copy-paste dropping the ':build' part of '@angular-devkit/build-angular:browser'.
Related errors
- Circular builder alias references detected:
- Cannot find builder ${JSON.stringify(builderStr)}.
- The builder requires a target.
- No project name provided and no default project found in wor
- Option "project" is required.
AI-assisted analysis of angular/angular-cli@bb72145f9a (2026-08-30).
Data as JSON: /api/errors/424b6105c48e5751.
Report an issue: GitHub.