angular/angular-cli · warning
The following Karma configuration files require manual migr
Error message
The following Karma configuration files require manual migration:
What it means
At the end of the Karma-to-Vitest migration, logSummary prints a summary of work left for you. This line announces that one or more Karma configuration files could not be automatically migrated and are listed on the following lines.
Source
Thrown at packages/schematics/angular/migrations/migrate-karma-to-vitest/migration.ts:198
context.logger.info('\n--- Karma to Vitest Migration Summary ---');
context.logger.info(`Projects migrated: ${migratedProjects.length}`);
if (migratedProjects.length > 0) {
context.logger.info(` - ${migratedProjects.join(', ')}`);
}
context.logger.info(`Projects skipped (non-applications): ${skippedNonApplications.length}`);
if (skippedNonApplications.length > 0) {
context.logger.info(` - ${skippedNonApplications.join(', ')}`);
}
context.logger.info(
`Projects skipped (missing application builder): ${skippedMissingAppBuilder.length}`,
);
if (skippedMissingAppBuilder.length > 0) {
context.logger.info(` - ${skippedMissingAppBuilder.join(', ')}`);
}
const uniqueManualFiles = [...new Set(manualMigrationFiles)];
if (uniqueManualFiles.length > 0) {
context.logger.warn(`\nThe following Karma configuration files require manual migration:`);
for (const file of uniqueManualFiles) {
context.logger.warn(` - ${file}`);
}
}
if (migratedProjects.length > 0) {
context.logger.info(
`\nNote: To refactor your test files from Jasmine to Vitest, consider running the following command:` +
`\n ng g @schematics/angular:refactor-jasmine-vitest <project_name>`,
);
}
context.logger.info('-----------------------------------------\n');
}
function updateProjects(tree: Tree, context: SchematicContext): Rule {
return updateWorkspace(async (workspace) => {
let needsCoverage = false;
let needsIstanbul = false;
const removableKarmaConfigs = new Map<string, KarmaConfigProcessingResult>();View on GitHub (pinned to bb72145f9a)
Solutions
- Inspect each listed Karma config file in the subsequent warning lines
- Manually port the custom settings into Vitest configs and set runnerConfig: true
- Delete the Karma configs after porting and re-run tests
Defensive patterns
Strategy: validation
Validate before calling
// before migrating a workspace, inventory custom karma configs
const files = Object.values(angularJson.projects)
.map(p => p.architect?.test?.options?.karmaConfig)
.filter(Boolean);
if (files.length) console.log('Karma configs needing manual migration:', files); Prevention
- Audit workspaces for custom karma configs before bulk migrations
- Standardize test configuration across projects to minimize manual migrations
- Schedule time to port listed configs immediately after migration
When it happens
Trigger: Running the migrate-karma-to-vitest migration when at least one processed project had a non-removable custom karma config, causing its karmaConfig path to be pushed to manualMigrationFiles.
Common situations: Workspace-wide migration where some projects use custom karma.conf.js files (custom webpack/test setups) — the migration completes for tests but flags these configs for manual follow-up.
Related errors
- Project "${projectName}" uses a custom coverage reporter "${
- Project "${projectName}" uses a custom Karma configuration f
- - ${file}
- No "test" target found for project "${options.project}". A "
- Cannot add a Vitest configuration as builder for "test" targ
AI-assisted analysis of angular/angular-cli@bb72145f9a (2026-08-30).
Data as JSON: /api/errors/83f1790ad604e44f.
Report an issue: GitHub.