angular/angular-cli · warning

The "@angular-devkit/build-angular:extract-i18n" builder is

Error message

The "@angular-devkit/build-angular:extract-i18n" builder is deprecated as part of Angular's Webpack support deprecation. Use "@angular/build:extract-i18n" instead. For more information, see https://angular.dev/tools/cli/build-system-migration.

What it means

The webpack-based `@angular-devkit/build-angular:extract-i18n` builder is deprecated as part of Angular's deprecation of Webpack support. Executing it prints this deprecation warning directing users to the esbuild/Vite-based `@angular/build:extract-i18n` builder. The extraction still runs; the warning signals future removal.

Source

Thrown at packages/angular_devkit/build_angular/src/builders/extract-i18n/builder.ts:38

/**
 * @experimental Direct usage of this function is considered experimental.
 */
export async function execute(
  options: ExtractI18nBuilderOptions,
  context: BuilderContext,
  transforms?: {
    webpackConfiguration?: ExecutionTransformer<webpack.Configuration>;
  },
): Promise<BuilderOutput> {
  // Determine project name from builder context target
  const projectName = context.target?.project;
  if (!projectName) {
    context.logger.error(`The 'extract-i18n' builder requires a target to be specified.`);

    return { success: false };
  }

  context.logger.warn(
    'The "@angular-devkit/build-angular:extract-i18n" builder is deprecated as part of Angular\'s Webpack support deprecation. ' +
      'Use "@angular/build:extract-i18n" instead. For more information, see https://angular.dev/tools/cli/build-system-migration.',
  );

  const { projectType } = (await context.getProjectMetadata(projectName)) as {
    projectType?: string;
  };
  if (projectType !== 'application') {
    context.logger.error(
      `Tried to extract from ${projectName} with 'projectType' ${projectType}, which is not supported.` +
        ` The 'extract-i18n' builder can only extract from applications.`,
    );

    return { success: false };
  }

  // Check Angular version.
  assertCompatibleAngularVersion(context.workspaceRoot);

View on GitHub (pinned to bb72145f9a)

Solutions

  1. Update the builder to `"@angular/build:extract-i18n"` in angular.json
  2. Run `ng update @angular/cli` to apply the automated build-system migration
  3. Migrate the application itself to the esbuild-based application builder first, since the new extractor targets it
  4. Verify extracted output paths/options (outputPath, format) still match the new builder's schema

Example fix

// before (angular.json)
"extract-i18n": { "builder": "@angular-devkit/build-angular:extract-i18n" }
// after
"extract-i18n": { "builder": "@angular/build:extract-i18n" }
Defensive patterns

Strategy: validation

Validate before calling

// angular.json pre-check before ng extract-i18n
const builder = workspace.projects[p].architect?.['extract-i18n']?.builder;
if (builder === '@angular-devkit/build-angular:extract-i18n') {
  console.warn('Deprecated builder in use; migrate to @angular/build:extract-i18n.');
}

Type guard

function usesDeprecatedBuilder(builder: string | undefined): boolean {
  return builder === '@angular-devkit/build-angular:extract-i18n';
}

Prevention

When it happens

Trigger: Running `ng extract-i18n` in a project whose builder target is still `@angular-devkit/build-angular:extract-i18n` (the default for pre-v17 angular.json workspaces, or non-application builders); emitted at the start of `execute()` after the project/target check.

Common situations: Workspaces not yet migrated to the application builder; projects that skipped `ng update` migrations; new extractions added by copying older angular.json snippets.

Related errors


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