I tried the following command to try add the monitoring feature of ionic to diagnose a problem in my app using ionic view.
$ ionic monitoring syncmaps
git rev-parse HEAD √ Running command - done! [INFO] No sourcemaps found, doing build...
? Do full prod build? (Y/n) y ?
Do full prod build? Yes [INFO] Running app-scripts build: --prod
[22:16:31] build prod started ... [22:16:31] clean started ... [22:16:31] clean finished in 1 ms [22:16:31] copy started ... [22:16:31] ngc started ... [22:16:37] ngc finished in 6.08 s [22:16:37] preprocess started ... [22:16:37] deeplinks started ... [22:16:38] deeplinks finished in 441 ms [22:16:38] optimization started ... [22:16:38] copy finished in 6.63 s Error: ./src/pages/admin/admin.ngfactory.js Module not found: Error: Can't resolve '../../../angularfire2/auth' in >'C:\Users\Gavin\Desktop\Web Development\app\src\pages\admin' resolve '../../../angularfire2/auth' in 'C:\Users\Gavin\Desktop\Web Development\app\src\pages\admin' using description file: C:\Users\Gavin\Desktop\Web Development\app\package.json (relative path: ./src/pages/admin) Field 'browser' doesn't contain a valid alias configuration
This error keeps going down the page for a long time, I get the same error if I type ionic cordova build --prod
I resolved it by deleting .ngmodules folder, downgrading my firebase version to npm i --save [email protected] , and then npm install. I was then able to build my app with ionic cordova --prod