angular/components · warning
Skipping migration for project ${projectName}. Unable to det
Error message
Skipping migration for project ${projectName}. Unable to determine 'tsconfig.json' file in workspace config. What it means
The CDK schematics update migrations (e.g. updateToV22) run per workspace project and need a tsconfig path (build or test target) to resolve type checking during migration. If the project config defines neither, the rule skips that project with this warning instead of migrating it.
Source
Thrown at src/cdk/schematics/ng-update/devkit-migration-rule.ts:96
return;
}
// Keep track of all project source files which have been checked/migrated. This is
// necessary because multiple TypeScript projects can contain the same source file and
// we don't want to check these again, as this would result in duplicated failure messages.
const analyzedFiles = new Set<WorkspacePath>();
const fileSystem = new DevkitFileSystem(tree);
const projectNames = workspace.projects.keys();
const migrations = [...cdkMigrations, ...extraMigrations] as NullableDevkitMigration[];
let hasFailures = false;
for (const projectName of projectNames) {
const project = workspace.projects.get(projectName)!;
const buildTsconfigPath = getTargetTsconfigPath(project, 'build');
const testTsconfigPath = getTargetTsconfigPath(project, 'test');
if (!buildTsconfigPath && !testTsconfigPath) {
logger.warn(
`Skipping migration for project ${projectName}. Unable to determine 'tsconfig.json' file in workspace config.`,
);
continue;
}
// In some applications, developers will have global stylesheets which are not
// specified in any Angular component. Therefore we glob up all CSS and SCSS files
// in the project and migrate them if needed.
// TODO: rework this to collect global stylesheets from the workspace config.
// TODO: https://github.com/angular/components/issues/24032.
const additionalStylesheetPaths = findStylesheetFiles(tree, project.root);
if (buildTsconfigPath !== null) {
runMigrations(project, projectName, buildTsconfigPath, additionalStylesheetPaths, false);
}
if (testTsconfigPath !== null) {
runMigrations(project, projectName, testTsconfigPath, additionalStylesheetPaths, true);
}View on GitHub (pinned to 0411926e7d)
Solutions
- Add architect build/test targets with a tsConfig option to the project in angular.json, then re-run the migration
- Ensure the project's targets point at an existing tsconfig.json file
- Run the migration for affected files manually if the project intentionally has no tsconfig
- Check angular.json for typos in target names (build/test)
Example fix
// before (angular.json)
"architect": { "my-build": { "options": {} } }
// after (angular.json)
"architect": { "build": { "options": { "tsConfig": "projects/app/tsconfig.app.json" } } } Defensive patterns
Strategy: validation
Validate before calling
const project = workspace.projects.get(name);
const hasTsconfig = ['build', 'test'].some(t =>
project?.targets?.get(t)?.options?.tsConfig);
if (!hasTsconfig) console.warn(`Project ${name} lacks a tsconfig; migration will be skipped`); Prevention
- Keep standard 'build' and 'test' architect targets in angular.json
- Ensure tsConfig option paths exist on disk
- Audit non-standard workspace configs before running ng update
- Re-run migrations after fixing workspace config so skipped projects are covered
When it happens
Trigger: Running ng update / the migration schematic on a workspace whose project (projectName) has no architect 'build' or 'test' target with a tsConfig option in angular.json/workspace config, hitting the logger.warn in createMigrationSchematicRule.
Common situations: Custom angular.json with renamed targets (no 'build'/'test' architect targets); library-only or bare projects without tsconfig references; monorepos with non-standard configurations; partially migrated Nx workspaces.
Related errors
- ⚠ Some issues were detected but could not be fixed automa
- No data could be found for target version: ${version}
- ${filePath}${lineAndCharacter} - ${message}
- Could not find '<head>' element in HTML file: ${htmlFileBuff
- Could not find <body> element in HTML file: ${htmlFileBuffer
AI-assisted analysis of angular/components@0411926e7d (2026-08-31).
Data as JSON: /api/errors/2c35b85a365a7a3d.
Report an issue: GitHub.