angular/angular-cli · warning
*
Error message
*
What it means
This `warn` is the logger adapter bridging the esbuild-based `@angular/build` extract-i18n pipeline to the Angular CLI logger; `"*"` means any message from the extraction process is forwarded verbatim via `context.logger.warn`. Warnings originate inside the application extraction (e.g. i18n parsing of the application build).
Source
Thrown at packages/angular_devkit/build_angular/src/builders/extract-i18n/application-extraction.ts:149
return fileMap.has(requestedPath);
},
dirname(path: string): string {
return nodePath.dirname(path);
},
};
const logger = {
// level 2 is warnings
level: 2,
debug(...args: string[]): void {
// eslint-disable-next-line no-console
console.debug(...args);
},
info(...args: string[]): void {
context.logger.info(args.join(''));
},
warn(...args: string[]): void {
context.logger.warn(args.join(''));
},
error(...args: string[]): void {
context.logger.error(args.join(''));
},
};
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const extractor = new extractorConstructor(filesystem as any, logger, {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
basePath: context.workspaceRoot as any,
useSourceMaps: true,
});
return extractor;
}
async function first<T>(iterable: AsyncIterable<T>): Promise<T | undefined> {View on GitHub (pinned to bb72145f9a)
Solutions
- Read the specific warning text emitted during extraction and fix the flagged template/source location
- Re-run `ng extract-i18n` after fixing to confirm the warning is gone
- Use `--verbose` to get more context about where extraction warnings originate
- Check for duplicate custom i18n ids with `ng extract-i18n` output and deduplicate them
Example fix
// before template: '<span i18n>Hello</span><span i18n="@@same-id">Other</span>' // duplicate id // after '@@unique-id-1' and '@@unique-id-2' // or remove explicit ids
Defensive patterns
Strategy: validation
Validate before calling
// pre-check source for duplicate explicit i18n ids before extraction
const ids = new Set<string>();
for (const m of template.matchAll(/i18n="@@([^"]+)"/g)) {
if (ids.has(m[1])) console.warn('Duplicate i18n id:', m[1]);
ids.add(m[1]);
} Prevention
- Run ng extract-i18n locally before pushing template changes
- Use unique explicit @@ids for stable translations
- Run the application builder build first so extraction sees valid input
- Review extractor warnings immediately; they usually pinpoint the file/template
When it happens
Trigger: Running `ng extract-i18n` with the esbuild-based application builder while the extraction encounters problems — unparsable templates, i18n metadata issues, or locale serialization notices — each forwarded through this adapter.
Common situations: New i18n attribute syntax or `$localize` usage the extractor flags; duplicate translation ids from refactored templates; extracting from a project whose source has i18n markers in unusual positions.
Related errors
- The development server only supports localizing a single loc
- *
- The "@angular-devkit/build-angular:extract-i18n" builder is
- Locale data for '${locale}' cannot be found. Using locale da
- Locale data for '${locale}' cannot be found. No locale data
AI-assisted analysis of angular/angular-cli@bb72145f9a (2026-08-30).
Data as JSON: /api/errors/db7fb99fc3c6169d.
Report an issue: GitHub.