{"record":{"id":"fb635ef6a8ac30f7","repo":"angular/angular-cli","slug":"angular-app-manifest-is-not-set-please-ensure-you","errorCode":null,"errorMessage":"Angular app manifest is not set. Please ensure you are using the '@angular/build:application' builder to build your server application.","messagePattern":"Angular app manifest is not set\\. Please ensure you are using the '@angular/build:application' builder to build your server application\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"packages/angular/ssr/src/manifest.ts","lineNumber":166,"sourceCode":"\n/**\n * Sets the Angular app manifest.\n *\n * @param manifest - The manifest object to set for the Angular application.\n */\nexport function setAngularAppManifest(manifest: AngularAppManifest): void {\n  angularAppManifest = manifest;\n}\n\n/**\n * Gets the Angular app manifest.\n *\n * @returns The Angular app manifest.\n * @throws Will throw an error if the Angular app manifest is not set.\n */\nexport function getAngularAppManifest(): AngularAppManifest {\n  if (!angularAppManifest) {\n    throw new Error(\n      'Angular app manifest is not set. ' +\n        `Please ensure you are using the '@angular/build:application' builder to build your server application.`,\n    );\n  }\n\n  return angularAppManifest;\n}\n\n/**\n * The Angular app engine manifest object.\n * This is used internally to store the current Angular app engine manifest.\n */\nlet angularAppEngineManifest: AngularAppEngineManifest | undefined;\n\n/**\n * Sets the Angular app engine manifest.\n *\n * @param manifest - The engine manifest object to set.","sourceCodeStart":148,"sourceCodeEnd":184,"githubUrl":"https://github.com/angular/angular-cli/blob/bb72145f9ab45aee29f523236b3a25cd0813a841/packages/angular/ssr/src/manifest.ts#L148-L184","documentation":"The server bundle expects the client build to register the AngularAppManifest via setAngularAppManifest (done automatically by @angular/build:application). If the global manifest is unset at runtime, the server bundle was not produced by that builder, so getAngularAppManifest throws to surface the misconfiguration.","triggerScenarios":"Serving a server bundle built with an old builder (@angular-devkit/build-angular:server) or webpack setup that never calls setAngularAppManifest, or running the SSR entry outside the built application context.","commonSituations":"Partial upgrade from legacy Universal setups, custom server builds (webpack/ts-node) compiling main.server directly, mixing builder versions between browser and server targets.","solutions":["Switch server build to '@angular/build:application' (or @angular-devkit/build-angular:application) in angular.json","Regenerate the app with ng add @angular/ssr to get the correct builder config and rebuild","Ensure you run the built server output (dist/<project>/server.mjs), not a locally compiled main.server.js","Update @angular/ssr and @angular/build to matching versions"],"exampleFix":"// before (angular.json server target)\n\"builder\": \"@angular-devkit/build-angular:server\"\n// after\n\"builder\": \"@angular/build:application\"","handlingStrategy":"try-catch","validationCode":"import { getAngularAppManifest } from '@angular/ssr';\ntry { getAngularAppManifest(); } catch { console.error('Server bundle not built with @angular/build:application'); }\n","typeGuard":null,"tryCatchPattern":"try {\n  const manifest = getAngularAppManifest();\n} catch (e) {\n  if (e instanceof Error && e.message.includes('app manifest is not set')) {\n    console.error('Rebuild with the application builder: ng build');\n    process.exit(1);\n  }\n  throw e;\n}","preventionTips":["Use @angular/build:application (not legacy :server builder) for server builds","Ship only the official dist output to production; never tsc-compile main.server manually","Keep @angular/ssr and builder packages version-aligned"],"tags":["ssr","manifest","builder","build"],"backgroundTag":"missing-app-manifest","analyzedSha":"bb72145f9ab45aee29f523236b3a25cd0813a841","analyzedAt":"2026-08-30T02:47:34.745Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}