I suddenly have an issue creating production builds
ionic cordova run android
works fine and generates a debug build on the device.
But all of a sudden if I try
ionic cordova run android --prod
I get this in the console:
[15:36:37] build prod started ...
[15:36:37] clean started ...
[15:36:37] clean finished in 3 ms
[15:36:37] copy started ...
[15:36:37] ngc started ...
[15:36:56] ngc finished in 18.50 s
[15:36:56] preprocess started ...
[15:36:56] deeplinks started ...
[15:36:57] deeplinks finished in 1.61 s
[15:36:57] optimization started ...
[15:36:57] copy finished in 20.34 s
[15:37:15] optimization finished in 17.85 s
[15:37:15] preprocess finished in 19.46 s
[15:37:15] webpack started ...
[15:38:24] webpack finished in 68.85 s
[15:38:24] sass started ...
[15:38:24] uglifyjs started ...
[15:38:26] sass finished in 2.06 s
[15:38:26] cleancss started ...
[15:38:28] cleancss finished in 1.85 s
[15:38:54] uglifyjs finished in 30.10 s
[15:38:54] postprocess started ...
I’ve uninstalled Node and re-installed it and uninstalled and re-installed ionic and cordova. But the same thing happens.
Here’s my Ionic Info output
cli packages: (/Users/richardshergold/IonicProjects/myproject/node_modules)
@ionic/cli-utils : 1.10.2
ionic (Ionic CLI) : 3.10.3
global packages:
Cordova CLI : 7.0.1
local packages:
@ionic/app-scripts : 2.1.4
Cordova Platforms : android 6.2.3
Ionic Framework : ionic-angular 3.4.0
System:
ios-deploy : 1.9.0
Node : v7.10.1
npm : 4.2.0
OS : macOS Sierra
Xcode : Xcode 8.3.3 Build version 8E3004b
I chose to install Node 7.10.1 because the first time I tried 6.11.3 and that didn’t solve the problem (can I use the very latest - 8.5?)
Ionic serve works fine. Any ideas?