Encyclopédie des erreurs

Plateforme manquante

Angular nécessite qu'une plateforme soit initialisée. Cette erreur est levée lorsque bootstrapApplication est utilisé côté serveur sans fournir de BootstrapContext.

Avec le rendu côté serveur, bootstrapApplication nécessite qu'un BootstrapContext lui soit passé en argument.

Déboguer l'erreur

Pour résoudre cette erreur, assurez-vous que votre fichier main.server.ts passe correctement un BootstrapContext à la fonction bootstrapApplication.

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;