Recommended Free Tools
Angular’s NG0401 “Missing Platform” error usually means the server-side bootstrap calls bootstrapApplication without forwarding a BootstrapContext. Update the server bootstrap function to accept that context and pass it as the third argument. Keep your project’s existing root component and server configuration.
What NG0401 means
Angular documents NG0401 for server-side use of bootstrapApplication without a BootstrapContext. The context carries a pre-existing platform injector; its platformRef property is a PlatformRef. In server-side rendering (SSR), Angular’s server platform API describes creating a platform for the request and passing it through this context.
As an Amazon Associate I earn from qualifying purchases.
The error reference does not publish a frequency or impact statistic. The relevant issue is the server bootstrap path, not a general failure to add application providers.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteFix the server bootstrap function
In main.server.ts, or the equivalent server entry point, receive the context from the SSR caller and forward it to bootstrapApplication:
#1 Best Overall
import {bootstrapApplication, BootstrapContext} from '@angular/platform-browser';
import {App} from './app/app';
import {config} from './app/app.config.server';
const bootstrap = (context: BootstrapContext) => bootstrapApplication(App, config, context);
export default bootstrap;
Use the root component and server configuration paths from your own project; the key change is passing context as the third argument. Angular’s API defines that argument as optional in general, but its NG0401 guidance requires it for this server-rendering case.
Check the SSR path before changing code
- Confirm which entry point fails. Verify that the error comes from server rendering rather than the browser bootstrap. NG0401’s documented case concerns server-side use.
- Inspect the server entry point. Look in
main.server.tsor its equivalent for the function exported to the SSR caller. Check that it accepts aBootstrapContext. - Pass the context through. Supply the received context as the third argument to
bootstrapApplication, while retaining the project’s existing root component and server configuration. - Check direct server-platform setup if applicable. If your code creates the server platform through Angular’s server-platform API, ensure that platform is supplied through the context.
- Identify the application architecture. If the app uses NgModules, inspect its existing bootstrap API rather than replacing it with a standalone example.
Standalone SSR and NgModule apps use different bootstrap APIs
| Application shape | Bootstrap API | What to check for SSR |
|---|---|---|
| Standalone application | bootstrapApplication |
For the documented NG0401 case, the server bootstrap function must accept and forward BootstrapContext. |
| Existing NgModule application | bootstrapModule with platformBrowser or platformServer |
Follow the module-based bootstrap path already used by the app; do not apply the standalone fix by replacing its architecture without checking the setup. |
Angular recommends bootstrapApplication for new code, but an existing module-based app has a distinct bootstrap path. First determine which API the failing server entry point actually calls.
Rank #2
What not to change for this error
Adding application-level providers, such as hydration providers, is not the specific NG0401 remedy documented by Angular. Hydration is a separate SSR configuration concern; the error’s stated fix is forwarding BootstrapContext.
Angular’s error and API documentation is live rather than tied to a specific release in the cited pages. Before editing, check your installed Angular version and the SSR files generated for your project, then adapt the example to those files.
Quick Recap
Rank #4
Rank #3
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




