I can’t give “IONIC BUILD ANDROID --PROD”, but “IONIC BUILD ANDROID” goes without problem.
C:\Zanthus\Zeus\Apache2\htdocs\ZCL>ionic info
Your system information:
Cordova CLI: 6.5.0
Ionic Framework Version: 3.0.1
Ionic CLI Version: 2.2.2
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 1.3.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v5.6.0
Xcode version: Not installed
C:\Zanthus\Zeus\Apache2\htdocs\ZCL>ionic build android --prod
> ionic-hello-world@ ionic:build C:\Zanthus\Zeus\Apache2\htdocs\ZCL
> ionic-app-scripts build "--prod"
[15:31:14] ionic-app-scripts 1.3.0
[15:31:14] build prod started ...
[15:31:14] clean started ...
[15:31:14] clean finished in 2 ms
[15:31:14] copy started ...
[15:31:14] ngc started ...
[15:31:29] ionic-app-script task: "build"
[15:31:29] Error: Illegal state: Could not load the summary for directive MyApp in
C:/Zanthus/Zeus/Apache2/htdocs/ZCL/src/app/app.component.ts.
Error: Illegal state: Could not load the summary for directive MyApp in C:/Zanthus/Zeus/Apache2/htdocs/ZCL/src/app/app.component.ts.
at Error (native)
at syntaxError (C:\Zanthus\Zeus\Apache2\htdocs\ZCL\node_modules\@angular\compiler\bundles\compiler.umd.js:1513:34)
at CompileMetadataResolver.getDirectiveSummary (C:\Zanthus\Zeus\Apache2\htdocs\ZCL\node_modules\@angular\compiler\bundles\compiler.umd.js:13872:31)
at C:\Zanthus\Zeus\Apache2\htdocs\ZCL\node_modules\@angular\compiler\bundles\compiler.umd.js:22263:206
at Array.map (native)
at AotCompiler._createSummary (C:\Zanthus\Zeus\Apache2\htdocs\ZCL\node_modules\@angular\compiler\bundles\compiler.umd.js:22263:154)
at AotCompiler._compileSrcFile (C:\Zanthus\Zeus\Apache2\htdocs\ZCL\node_modules\@angular\compiler\bundles\compiler.umd.js:22220:34)
at C:\Zanthus\Zeus\Apache2\htdocs\ZCL\node_modules\@angular\compiler\bundles\compiler.umd.js:22201:91
at Array.map (native)
at C:\Zanthus\Zeus\Apache2\htdocs\ZCL\node_modules\@angular\compiler\bundles\compiler.umd.js:22201:56
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ionic-hello-world@ ionic:build: `ionic-app-scripts build "--prod"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ionic-hello-world@ ionic:build script 'ionic-app-scripts build "--prod"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ionic-hello-world package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ionic-app-scripts build "--prod"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ionic-hello-world
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls ionic-hello-world
npm ERR! There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\sz_ph\AppData\Roaming\npm-cache\_logs\2017-04-21T18_31_29_508Z-debug.log