{"record":{"id":"bdd87941d38cc70d","repo":"angular/angular-cli","slug":"project-projectname-uses-a-custom-karma-repor","errorCode":null,"errorMessage":"Project \"${projectName}\" uses a custom Karma reporter \"${r}\". This reporter cannot be automatically mapped to Vitest. Please check the Vitest documentation for equivalent reporters.","messagePattern":"Project \"(.+?)\" uses a custom Karma reporter \"(.+?)\"\\. This reporter cannot be automatically mapped to Vitest\\. Please check the Vitest documentation for equivalent reporters\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/schematics/angular/migrations/migrate-karma-to-vitest/karma-processor.ts","lineNumber":38,"sourceCode":"): void {\n  const reporters = analysis.settings.get('reporters');\n  if (Array.isArray(reporters)) {\n    const mappedReporters: string[] = [];\n    for (const r of reporters) {\n      if (typeof r === 'string') {\n        if (r === 'progress') {\n          mappedReporters.push('default');\n        } else if (r === 'kjhtml') {\n          context.logger.warn(\n            `Project \"${projectName}\" uses the \"kjhtml\" reporter. ` +\n              `This has not been automatically mapped. ` +\n              `For an interactive test UI in Vitest, consider setting the \"ui\" option to true in your test target options ` +\n              `and installing \"@vitest/ui\".`,\n          );\n        } else if (SUPPORTED_REPORTERS.has(r)) {\n          mappedReporters.push(r);\n        } else {\n          context.logger.warn(\n            `Project \"${projectName}\" uses a custom Karma reporter \"${r}\". ` +\n              `This reporter cannot be automatically mapped to Vitest. ` +\n              `Please check the Vitest documentation for equivalent reporters.`,\n          );\n        }\n      } else {\n        context.logger.warn(\n          `Project \"${projectName}\" has a non-string reporter in Karma config. ` +\n            `This cannot be automatically mapped to Vitest.`,\n        );\n      }\n    }\n    if (mappedReporters.length > 0) {\n      options['reporters'] = [...new Set(mappedReporters)];\n    }\n  }\n}\n","sourceCodeStart":20,"sourceCodeEnd":56,"githubUrl":"https://github.com/angular/angular-cli/blob/bb72145f9ab45aee29f523236b3a25cd0813a841/packages/schematics/angular/migrations/migrate-karma-to-vitest/karma-processor.ts#L20-L56","documentation":"Warning from extractReporters in karma-processor.ts. During the Karma-to-Vitest migration, each string reporter in karma.conf.js is checked against SUPPORTED_REPORTERS. A string reporter that is neither 'progress', 'kjhtml', nor in the supported set is a custom Karma reporter that cannot be auto-mapped, so it is skipped with this warning.","triggerScenarios":"Running the migrate-karma-to-vitest migration on a karma.conf.js whose `reporters` array contains an unsupported custom string (e.g. 'coverage-istanbul', 'mocha', 'junit', or a plugin-provided reporter name).","commonSituations":"Projects using karma-coverage-istanbul or karma-junit-reporter for CI; third-party or in-house Karma reporter plugins; teams with specialized reporting setups.","solutions":["Find a Vitest equivalent reporter/plugin and add it to the generated vitest config manually (e.g. @vitest/coverage-v8, vitest junit reporter).","Remove the custom reporter from karma.conf.js before migrating if it is no longer needed.","Consult the Vitest documentation for equivalent reporters and configure them post-migration.","Keep coverage via Vitest's built-in coverage config instead of karma-coverage* plugins."],"exampleFix":"// before (karma.conf.js)\nreporters: ['progress', 'coverage-istanbul'],\n// after (vitest config)\ntest: { reporters: ['default'], coverage: { provider: 'v8', enabled: true } }","handlingStrategy":"validation","validationCode":"const SUPPORTED = new Set(['progress', 'kjhtml', 'dots', ...]);\nconst reporters: string[] = karmaConfig?.reporters ?? [];\nconst unsupported = reporters.filter(r => !SUPPORTED.has(r) && r !== 'progress');\nif (unsupported.length) console.warn('reporters need manual Vitest mapping:', unsupported);","typeGuard":"function hasCustomReporters(reporters: unknown): reporters is string[] {\n  return Array.isArray(reporters) && reporters.some(r => typeof r === 'string' && !SUPPORTED_REPORTERS.has(r));\n}","tryCatchPattern":null,"preventionTips":["Inventory Karma reporter plugins in package.json before migrating.","Map custom reporters to Vitest equivalents (coverage, junit, etc.) ahead of the migration.","Prefer Vitest built-in coverage/reporting over third-party Karma plugins in new projects."],"tags":["angular","migration","karma","vitest","reporters","custom-reporter"],"backgroundTag":"unmigrated-karma-reporter","analyzedSha":"bb72145f9ab45aee29f523236b3a25cd0813a841","analyzedAt":"2026-08-30T02:47:34.745Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}