angular/components · warning

⚠ Some issues were detected but could not be fixed automa

Error message

  ⚠  Some issues were detected but could not be fixed automatically. Please check the output above and fix these issues manually.

What it means

After a `ng update @angular/cdk` migration runs, `onMigrationComplete` reports whether any migration tasks failed. If failures were collected, it logs this warning telling you the migration could not fix everything automatically and that manual fixes are required. It is not an exception — the update itself succeeded, but the codebase still contains issues the migration tooling flagged.

Source

Thrown at src/cdk/schematics/ng-update/index.ts:37

    TargetVersion.V22,
    cdkMigrations,
    cdkUpgradeData,
    onMigrationComplete,
  );
}

/** Function that will be called when the migration completed. */
function onMigrationComplete(
  context: SchematicContext,
  targetVersion: TargetVersion,
  hasFailures: boolean,
) {
  context.logger.info('');
  context.logger.info(`  ✓  Updated Angular CDK to ${targetVersion}`);
  context.logger.info('');

  if (hasFailures) {
    context.logger.warn(
      '  ⚠  Some issues were detected but could not be fixed automatically. Please check the ' +
        'output above and fix these issues manually.',
    );
  }
}

View on GitHub (pinned to 0411926e7d)

Solutions

  1. Scroll up in the update output to find each logged failure (file path, line, and reason) and fix them manually as described.
  2. Re-run `ng update @angular/cdk @angular/material --from=<oldVer> --to=<newVer> --migrate-only` after fixing to attempt any remaining migrations.
  3. Check the Angular update guide for the version jump to see if manual steps are documented for the failing migration.

Example fix

// before (output shows: src/app/foo.ts@12:5 - Could not migrate import)
import { Dialog } from '@angular/cdk/dialog'; // old symbol usage

// after
// manually apply the migration the tool could not perform,
// following the failure message in the ng update output
Defensive patterns

Strategy: validation

Prevention

When it happens

Trigger: Running `ng update @angular/cdk @angular/material` where one or more migration tasks (e.g. import path, class inheritance, misc template migrations) recorded failures in their results passed to `hasFailures`.

Common situations: Non-standard code the AST migration cannot parse or safely rewrite (dynamic imports, unusual template expressions), projects with uncommitted merge states, or custom files excluded from tsconfig that migrations partially cover.

Related errors


AI-assisted analysis of angular/components@0411926e7d (2026-08-31). Data as JSON: /api/errors/d81bd7ba6a8c3af5. Report an issue: GitHub.