Build error: can't find symbol KeyRegistry

I have just installed the Ionic Cloud components with:

npm install @ionic/cloud-angular --save

but as soon as I import the libraries with:

import { CloudSettings, CloudModule } from ‘@ionic/cloud-angular’

I get the following error. I did not even setup my cloudSettings or made any use of these libraries. Simply importing them is enough to get the error.

17:18:51] can’t resolve module C:/Users/Luc/Dropbox/Sports _
_ Manager/Mobile/node_modules/@ionic/cloud-angular/node_modules/@angular/core/src/di/reflect

ive_key.d.ts from _
_ C:/Users/Luc/Dropbox/Sports _
_ Manager/Mobile/node_modules/@ionic/cloud-angular/node_modules/@angular/core/src/di/reflect

_ive_key.d.ts _
[17:18:51] Error: can’t find symbol KeyRegistry exported from module C:/Users/Luc/Dropbox/Sports _
_ Manager/Mobile/node_modules/@ionic/cloud-angular/node_modules/@angular/core/src/di/reflect

_ive_key.d.ts _
_[17:18:51] ngc failed _
_[17:18:51] ionic-app-script task: “build” _
[17:18:51] Error: Error

It works fine when I run “ionic serve -c” but I get this error when ever I run “ionic run android” or “ionic build android”.

Any clues?

ionic info:
ordova CLI: 6.3.1
Ionic Framework Version: 2.0.0-rc.1
Ionic CLI Version: 2.1.15
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 0.0.46
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v6.9.1
Xcode version: Not installed

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

Your system information:

Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.1
Ionic CLI Version: 2.1.8
Ionic App Lib Version: 2.1.4
Ionic App Scripts Version: 0.0.44
ios-deploy version: 1.9.0
ios-sim version: 5.0.9
OS: macOS Sierra
Node Version: v6.9.1
Xcode version: Xcode 8.2 Build version 8C38

I got it to work this morning!
Just uninstall and update to all latest versions.

npm uninstall -g ionic
npm install -g ionic@latest
npm uninstall ionic-angular
npm install ionic-angular@latest --save
npm uninstall @ionic/app-scripts
npm install @ionic/app-scripts@latest --save-dev

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! :slight_smile: