Bootstrap call not found

Hey guys,
i’m trying to convert my ionic app into a PWA with ng add @angular/pwa but I always get back the following:

-Bootstrap call not found.

Can anyone help me?

2 Likes

I have the same issue

i have the same problem

Hello, i have a solution.

  1. Change your main.ts to:
    import { enableProdMode, importProvidersFrom } from ‘@angular/core’;
    import { bootstrapApplication } from ‘@angular/platform-browser’;
    import { RouteReuseStrategy, provideRouter } from ‘@angular/router’;
    import { IonicModule, IonicRouteStrategy } from ‘@ionic/angular’;

import { routes } from ‘./app/app.routes’;
import { AppComponent } from ‘./app/app.component’;
import { environment } from ‘./environments/environment’;
import { platformBrowserDynamic } from ‘@angular/platform-browser-dynamic’;

if (environment.production) {
enableProdMode();
}

// bootstrapApplication(AppComponent, {
// providers: [
// { provide: RouteReuseStrategy, useClass: IonicRouteStrategy },
// importProvidersFrom(IonicModule.forRoot({})),
// provideRouter(routes),
// ],
// });

platformBrowserDynamic().bootstrapModule(AppComponent)
.catch(err => console.error(err));

  1. RUN ng add @angular/pwa (may fail)
  2. Delete node_modules and run npm install.
  3. RUN ng add @angular/pwa
    5.Change your main.ts to default.