I got an error when use ionic cordova build andriod --prod --release
.
Running app-scripts build: --prod --iscordovaserve --externalIpRequired --nobrowser
[11:54:24] build prod started ...
[11:54:24] clean started ...
[11:54:24] clean finished in 7 ms
[11:54:24] copy started ...
[11:54:24] ngc started ...
[WARN] Error occurred during command execution from a CLI plugin (@ionic/cli-plugin-cordova). Your plugins may be out of
date.
Error: Type About in /Users/MyUser/Desktop/Workspace/myapp/src/pages/about/about.ts is part of the declarations of 2 modules: AppModule in /Users/MyUser/Desktop/Workspace/myapp/src/app/app.module.ts and AboutModule in /Users/MyUser/Desktop/Workspace/myapp/src/pages/about/about.module.ts! Please consider moving About in /Users/MyUser/Desktop/Workspace/myapp/src/pages/about/about.ts to a higher module that imports AppModule in /Users/MyUser/Desktop/Workspace/myapp/src/app/app.module.ts and AboutModule in /Users/MyUser/Desktop/Workspace/myapp/src/pages/about/about.module.ts. You can also create a new NgModule that exports and includes About in /Users/MyUser/Desktop/Workspace/myapp/src/pages/about/about.ts then import that NgModule in AppModule in /Users/MyUser/Desktop/Workspace/myapp/src/app/app.module.ts and AboutModule in /Users/MyUser/Desktop/Workspace/myapp/src/pages/about/about.module.ts.
Ionic info
global packages:
@ionic/cli-utils : 1.5.0
Cordova CLI : 7.0.1
Ionic CLI : 3.5.0
local packages:
@ionic/app-scripts : 2.0.0
@ionic/cli-plugin-cordova : 1.4.1
@ionic/cli-plugin-ionic-angular : 1.3.2
Cordova Platforms : android 6.2.3
Ionic Framework : ionic-angular 3.5.3
System:
Node : v6.11.0
OS : macOS Sierra
Xcode : Xcode 8.3.3 Build version 8E3004b
ios-deploy : not installed
ios-sim : not installed
npm : 3.10.10
What happen?