{"record":{"id":"8a6294432641887a","repo":"angular/angular-cli","slug":"the-angular-devkit-build-angular-karma-builder","errorCode":null,"errorMessage":"The \"@angular-devkit/build-angular:karma\" builder is deprecated as part of Angular's Webpack support deprecation. Use \"@angular/build:karma\" instead. For more information, see https://angular.dev/tools/cli/build-system-migration.","messagePattern":"The \"@angular-devkit/build-angular:karma\" builder is deprecated as part of Angular's Webpack support deprecation\\. Use \"@angular/build:karma\" instead\\. For more information, see https://angular\\.dev/tools/cli/build-system-migration\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/angular_devkit/build_angular/src/builders/karma/index.ts","lineNumber":42,"sourceCode":"\nexport type KarmaConfigOptions = ConfigOptions & {\n  buildWebpack?: unknown;\n  configFile?: string;\n};\n\n/**\n * @experimental Direct usage of this function is considered experimental.\n */\nexport async function* execute(\n  options: KarmaBuilderOptions,\n  context: BuilderContext,\n  transforms: {\n    webpackConfiguration?: ExecutionTransformer<Configuration>;\n    // The karma options transform cannot be async without a refactor of the builder implementation\n    karmaOptions?: (options: KarmaConfigOptions) => KarmaConfigOptions;\n  } = {},\n): AsyncIterable<BuilderOutput> {\n  context.logger.warn(\n    'The \"@angular-devkit/build-angular:karma\" builder is deprecated as part of Angular\\'s Webpack support deprecation. ' +\n      'Use \"@angular/build:karma\" instead. For more information, see https://angular.dev/tools/cli/build-system-migration.',\n  );\n\n  // Check Angular version.\n  assertCompatibleAngularVersion(context.workspaceRoot);\n\n  if (await checkForEsbuild(options, context)) {\n    if (transforms.webpackConfiguration) {\n      context.logger.warn(\n        `This build is using the application builder but transforms.webpackConfiguration was provided. The transform will be ignored.`,\n      );\n    }\n\n    if (options.fileReplacements) {\n      options.fileReplacements = normalizeFileReplacements(options.fileReplacements, './');\n    }\n","sourceCodeStart":24,"sourceCodeEnd":60,"githubUrl":"https://github.com/angular/angular-cli/blob/bb72145f9ab45aee29f523236b3a25cd0813a841/packages/angular_devkit/build_angular/src/builders/karma/index.ts#L24-L60","documentation":"The @angular-devkit/build-angular:karma builder emits a deprecation warning because Angular is deprecating its Webpack-based build system. It directs users to the esbuild-based @angular/build:karma builder.","triggerScenarios":"Any execution of `ng test` using the @angular-devkit/build-angular:karma builder (webpack-based) on a recent Angular version.","commonSituations":"Projects still using karma with the legacy webpack builder after upgrading Angular; CI logs filling with deprecation warnings.","solutions":["Migrate to @angular/build:karma (ng generate or manually update angular.json builder field).","Run `ng update` migrations which can switch the builder automatically.","Temporarily ignore the warning if migration is planned later; the builder still functions."],"exampleFix":"// angular.json\n// before\n\"builder\": \"@angular-devkit/build-angular:karma\"\n// after\n\"builder\": \"@angular/build:karma\"","handlingStrategy":"fallback","validationCode":"// Detect deprecated builder usage in angular.json:\nconst cfg = require('./angular.json');\nfor (const [name, p] of Object.entries(cfg.projects)) {\n  for (const [t, target] of Object.entries(p.architect ?? p.targets ?? {})) {\n    if (target.builder === '@angular-devkit/build-angular:karma') console.warn(`Deprecated builder on ${name}:${t} - migrate to @angular/build:karma`);\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run `ng update` on every Angular major upgrade to migrate builders.","Prefer @angular/build:karma for new projects.","Audit angular.json builders in CI to flag webpack-based ones."],"tags":["deprecation","angular","webpack","karma"],"backgroundTag":"webpack-builder-deprecated","analyzedSha":"bb72145f9ab45aee29f523236b3a25cd0813a841","analyzedAt":"2026-08-30T02:47:34.745Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}