I am facing the same issue too when I tried to build for android and ios (ionic build android | ionic build ios), help please !! I am stuck for 2 days !
[16:52:34] can’t resolve module
/Users/hendryzheng/mobile_app/fvfs/node_modules/@ionic/cloud-angular/node_modules/@angular/core/src/di/reflective_key.d.ts
from
/Users/hendryzheng/mobile_app/fvfs/node_modules/@ionic/cloud-angular/node_modules/@angular/core/src/di/reflective_key.d.ts
[16:52:34] Error: can’t find symbol KeyRegistry exported from module
/Users/hendryzheng/mobile_app/fvfs/node_modules/@ionic/cloud-angular/node_modules/@angular/core/src/di/reflective_key.d.ts
[16:52:34] ngc failed
[16:52:34] ionic-app-script task: “build”
[16:52:34] Error: Error
It then told me that prod.main.ts and dev.main.ts were deprecated and they needed to be deleted and replaced with a simple main.ts. So I just started a new project and copied the main.ts from this new project into my current project and delete the dev/prod files. Just ran a build and it seems to compile fine now!