Running app-scripts build: --prod --address 0.0.0.0 --port 8100 --p 8100 --livereload-port 35729 --r 35729 --iscordovaserve --externalIpRequired --nobrowser
[11:54:21] build prod started ...
[11:54:21] clean started ...
[11:54:21] clean finished in 96 ms
[11:54:21] copy started ...
[11:54:21] ngc started ...
[11:54:36] ngc finished in 15.72 s
[11:54:36] preprocess started ...
[11:54:36] deeplinks started ...
[11:54:37] deeplinks finished in 673 ms
[11:54:37] optimization started ...
[11:54:38] copy finished in 17.34 s
[11:54:54] optimization finished in 16.93 s
[11:54:54] preprocess finished in 17.60 s
[11:54:54] webpack started ...
[11:56:30] webpack finished in 95.61 s
[11:56:30] sass started ...
[11:56:30] uglifyjs started ...
[WARN] Error occurred during command execution from a CLI plugin (@ionic/cli-plugin-cordova).
Error: Uglify failed: Unexpected token: name (AboutPage) in undefined at line undefined, col undefined, pos undefined
Segmentation fault: 11
I’ve looked at my usage of AboutPage - there’s nothing special, it only occurs 4 times in the entire codebase and the syntax is fine. I think that’s a red herring. How do I debug this? The dev build works fine.
ionic cordova build --release android --prod --verbose
[DEBUG] CLI flags: { interactive: true, confirm: false }
[DEBUG] { cwd: '/Users/mbeckett/sites/apps/meded-build-test', local: true, binPath:
'/Users/mbeckett/.nvm/versions/node/v6.9.1/lib/node_modules/ionic/bin/ionic', libPath:
'/Users/mbeckett/sites/apps/meded-build-test/node_modules/ionic/dist/index.js' }
[DEBUG] Loading local plugin @ionic/cli-plugin-proxy
[DEBUG] Throwing PLUGIN_NOT_INSTALLED for local @ionic/cli-plugin-proxy
[DEBUG] Loading local plugin @ionic/cli-plugin-cordova
[DEBUG] Loading local plugin @ionic/cli-plugin-ionic-angular
Running app-scripts build: --prod --iscordovaserve --externalIpRequired --nobrowser
[13:02:48] build prod started ...
[13:02:48] clean started ...
[13:02:48] clean finished in 3 ms
[13:02:48] copy started ...
[13:02:48] ngc started ...
[13:02:58] ngc finished in 9.66 s
[13:02:58] preprocess started ...
[13:02:58] deeplinks started ...
[13:02:59] deeplinks finished in 815 ms
[13:02:59] optimization started ...
[13:02:59] copy finished in 10.71 s
[13:03:12] optimization finished in 13.33 s
[13:03:12] preprocess finished in 14.14 s
[13:03:12] webpack started ...
[13:04:37] webpack finished in 85.08 s
[13:04:37] sass started ...
[13:04:37] uglifyjs started ...
[WARN] Error occurred during command execution from a CLI plugin (@ionic/cli-plugin-cordova).
Error: Uglify failed: Unexpected token: name (AboutPage) in undefined at line undefined, col undefined, pos undefined
[DEBUG] Error: Uglify failed: Unexpected token: name (AboutPage) in undefined at line undefined, col undefined, pos
undefined
at BuildError.Error (native)
at new BuildError
(/Users/mbeckett/sites/apps/meded-build-test/node_modules/@ionic/app-scripts/dist/util/errors.js:16:28)
at taskReject
(/Users/mbeckett/sites/apps/meded-build-test/node_modules/@ionic/app-scripts/dist/worker-process.js:36:22)
at /Users/mbeckett/sites/apps/meded-build-test/node_modules/@ionic/app-scripts/dist/worker-process.js:14:13
Segmentation fault: 11
It’s no different than any other page in this app, and it’s no different than any pages in any of the other apps I’ve done that have compiled correctly.
Not sure what’s suspicious about it, it’s the same pattern I’ve used many times. I did a prod build of my big app a week ago that uses it.
I’m just building an array of pages to import in to the app module - I have 21 pages, so it reduces the size of my app.module by 20 imports, 20 declarations, and 20 entry component entries by including them in an array.
However, on your suspicion I have removed that pattern, rewrote the app.module.ts with all the explicit imports/etc and still getting the same issue.