Update the Angular / Ionic libraries to get a related bug solved.
If you have a standalone app, check if your Ionic imports are correct. E.g. change
import { ToastController } from '@ionic/angular';
to
import { ToastController } from '@ionic/angular/standalone';