{"record":{"id":"9196f3c63f4a9224","repo":"angular/angular","slug":"runtimeerrorcode-platform-not-found","errorCode":"RuntimeErrorCode.PLATFORM_NOT_FOUND","errorMessage":"Missing Platform: This may be due to using `bootstrapApplication` on the server without passing a `BootstrapContext`. Please make sure that `bootstrapApplication` is called with a `context` argument.","messagePattern":"Missing Platform: This may be due to using `bootstrapApplication` on the server without passing a `BootstrapContext`\\. Please make sure that `bootstrapApplication` is called with a `context` argument\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"packages/core/src/application/create_application.ts","lineNumber":48,"sourceCode":" * Platforms (such as `platform-browser`) may require different set of application and platform\n * providers for an application to function correctly. As a result, platforms may use this function\n * internally and supply the necessary providers during the bootstrap, while exposing\n * platform-specific APIs as a part of their public API.\n *\n * @returns A promise that returns an `ApplicationRef` instance once resolved.\n */\n\nexport function internalCreateApplication(config: {\n  rootComponent?: Type<unknown>;\n  appProviders?: Array<Provider | EnvironmentProviders>;\n  platformProviders?: Provider[];\n  platformRef?: PlatformRef;\n}): Promise<ApplicationRef> {\n  const {rootComponent, appProviders, platformProviders, platformRef} = config;\n  profiler(ProfilerEvent.BootstrapApplicationStart);\n\n  if (typeof ngServerMode !== 'undefined' && ngServerMode && !platformRef) {\n    throw new RuntimeError(\n      RuntimeErrorCode.PLATFORM_NOT_FOUND,\n      ngDevMode &&\n        'Missing Platform: This may be due to using `bootstrapApplication` on the server without passing a `BootstrapContext`. ' +\n          'Please make sure that `bootstrapApplication` is called with a `context` argument.',\n    );\n  }\n\n  try {\n    const platformInjector =\n      platformRef?.injector ?? createOrReusePlatformInjector(platformProviders as StaticProvider[]);\n\n    if ((typeof ngDevMode === 'undefined' || ngDevMode) && rootComponent !== undefined) {\n      assertStandaloneComponentType(rootComponent);\n    }\n\n    // Create root application injector based on a set of providers configured at the platform\n    // bootstrap level as well as providers passed to the bootstrap call by a user.\n    const allAppProviders = [","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/angular/angular/blob/51cb07e98081ab7e4e84a9e0949266a8e19cca84/packages/core/src/application/create_application.ts#L30-L66","documentation":"Error \"Missing Platform: This may be due to using `bootstrapApplication` on the server without passing a `BootstrapContext`. Please make sure that `bootstrapApplication` is called with a `context` argument.\" thrown in angular/angular.","triggerScenarios":"Thrown at packages/core/src/application/create_application.ts:48 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a BootstrapContext: bootstrapApplication(AppComponent, config, context) when bootstrapping on the server."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"51cb07e98081ab7e4e84a9e0949266a8e19cca84","analyzedAt":"2026-08-22T07:04:54.531Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}