{"record":{"id":"805419789870816e","repo":"angular/angular-cli","slug":"cannot-update-project-projectname-to-use-the","errorCode":null,"errorMessage":"Cannot update project \"${projectName}\" to use the application builder as the browser tsconfig cannot be located.","messagePattern":"Cannot update project \"(.+?)\" to use the application builder as the browser tsconfig cannot be located\\.","errorType":"exception","errorClass":"SchematicsException","httpStatus":null,"severity":"error","filePath":"packages/schematics/angular/migrations/use-application-builder/migration.ts","lineNumber":109,"sourceCode":"      }\n    }\n\n    // Delete removed options\n    delete options['vendorChunk'];\n    delete options['commonChunk'];\n    delete options['resourcesOutputPath'];\n    delete options['buildOptimizer'];\n    delete options['main'];\n    delete options['ngswConfigPath'];\n  }\n\n  // Merge browser and server tsconfig\n  if (serverTarget) {\n    const browserTsConfig = buildTarget.options?.tsConfig;\n    const serverTsConfig = serverTarget.options?.tsConfig;\n\n    if (typeof browserTsConfig !== 'string') {\n      throw new SchematicsException(\n        `Cannot update project \"${projectName}\" to use the application builder` +\n          ` as the browser tsconfig cannot be located.`,\n      );\n    }\n\n    if (typeof serverTsConfig !== 'string') {\n      throw new SchematicsException(\n        `Cannot update project \"${projectName}\" to use the application builder` +\n          ` as the server tsconfig cannot be located.`,\n      );\n    }\n\n    const browserJson = new JSONFile(tree, browserTsConfig);\n    const serverJson = new JSONFile(tree, serverTsConfig);\n\n    const filesPath = ['files'];\n\n    const files = new Set([","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/angular/angular-cli/blob/bb72145f9ab45aee29f523236b3a25cd0813a841/packages/schematics/angular/migrations/use-application-builder/migration.ts#L91-L127","documentation":"In the `use-application-builder` migration, `updateBuildTarget` merges the browser and server build tsconfigs when converting a project to the `@angular/build:application` builder. It reads `buildTarget.options?.tsConfig` and requires a string path; when the browser target has no `tsConfig` option (or it is not a string), the migration cannot proceed safely and throws this SchematicsException, leaving the project un-migrated.","triggerScenarios":"Running `ng update @angular/cli` (or the migration directly) on a project whose `build` target in angular.json lacks a string-valued `options.tsConfig` — deleted tsconfig entry, tsConfig placed only in configurations, or a hand-edited angular.json.","commonSituations":"Workspaces where tsconfig.spec.json/tsconfig.app.json were reorganized manually; projects generated by older CLI versions or third-party generators that omitted tsConfig from the browser target; partially reverted migrations leaving broken angular.json.","solutions":["Add a string `tsConfig` to the project's `build` target options in angular.json (e.g. `\"tsConfig\": \"tsconfig.app.json\"`) and re-run the migration.","If tsConfig lives under `configurations`, move/duplicate the browser tsconfig path into the main `options` block before migrating.","Ensure the referenced tsconfig file exists on disk, then retry `ng update @angular/cli --from <version> --to <version> --migrate-only`."],"exampleFix":"// angular.json before\n\"build\": { \"builder\": \"@angular-devkit/build-angular:browser\", \"options\": { \"outputPath\": \"dist/app\" } }\n// after\n\"build\": { \"builder\": \"@angular-devkit/build-angular:browser\", \"options\": { \"outputPath\": \"dist/app\", \"tsConfig\": \"tsconfig.app.json\" } }","handlingStrategy":"validation","validationCode":"const build = angularJson.projects[name].architect.build;\nif (typeof build?.options?.tsConfig !== 'string') {\n  throw new Error(`Browser build target of \"${name}\" needs a string options.tsConfig before migrating to the application builder.`);\n}","typeGuard":"function hasBrowserTsConfig(t: { options?: { tsConfig?: unknown } } | undefined): t is { options: { tsConfig: string } } {\n  return typeof t?.options?.tsConfig === 'string';\n}","tryCatchPattern":"try {\n  await runMigration('use-application-builder');\n} catch (e) {\n  if (e instanceof SchematicsException && e.message.includes('browser tsconfig cannot be located')) {\n    console.error('Add options.tsConfig to the browser build target in angular.json, then re-run the migration.');\n  } else throw e;\n}","preventionTips":["Ensure the browser build target declares a string `options.tsConfig` before running `ng update` migrations.","Avoid hand-editing angular.json to remove the tsConfig entry.","Run migrations on a clean git state so failures can be reverted and retried after fixing angular.json."],"tags":["angular","migration","application-builder","angular-json","missing-tsconfig"],"backgroundTag":"missing-tsconfig-option","analyzedSha":"bb72145f9ab45aee29f523236b3a25cd0813a841","analyzedAt":"2026-08-30T02:47:34.745Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}