Compilation fails during build process whereas application loads fine on ionic serve.
✗ ionic run android
[10:39:29] ionic-app-scripts 0.0.23
[10:39:29] build prod started ...
[10:39:29] clean started ...
[10:39:29] clean finished in 16 ms
[10:39:29] copy started ...
[10:39:29] ngc started ...
[10:39:29] copy finished in 270 ms
[10:39:37] ngc error: Error: Cannot determine the module for component ChatsPage!
at /Users/vishal/Sites/app/node_modules/@angular/compiler/bundles/compiler.umd.js:12963:25
at Array.map (native)
at OfflineCompiler.compile (/Users/vishal/Sites/app/node_modules/@angular/compiler/bundles/compiler.umd.js:12959:31)
at /Users/vishal/Sites/app/node_modules/@angular/compiler-cli/src/codegen.js:108:18
at Array.map (native)
at CodeGenerator.codegen (/Users/vishal/Sites/app/node_modules/@angular/compiler-cli/src/codegen.js:106:38)
at codegen (/Users/vishal/Sites/app/node_modules/@angular/compiler-cli/src/main.js:7:81)
at Object.main (/Users/vishal/Sites/app/node_modules/@angular/tsc-wrapped/src/main.js:30:16)
at Object.<anonymous> (/Users/vishal/Sites/app/node_modules/@angular/compiler-cli/src/main.js:14:9)
at Module._compile (module.js:541:32)
[10:39:37] ngc error: Compilation failed
Below is the output of ionic info-
✗ ionic info
Your system information:
Cordova CLI: 6.3.1
Gulp version: CLI version 1.2.2
Gulp local:
Ionic Framework Version: 2.0.0-rc.0
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
ios-deploy version: 1.8.5
ios-sim version: 5.0.6
OS: Mac OS X El Capitan
Node Version: v6.2.0
Xcode version: Xcode 7.3.1 Build version 7D1014