I updated my ionic2 app from beta.11 to rc.0. When I do ionic serve works fine on the browser. When I do a ios build and deploy to actual device, I see the app launches the splash screen and then shows white screen. I debugged with the safari debugger and I don’t see main.js.
When I do ionic build ios I see the following error
Error: ENOENT: no such file or director /users/blah/repo/app/www/build/main.js
Here is my system config.
Cordova CLI: 6.3.1
Gulp version: CLI version 3.9.1
Gulp local: Local version 3.9.1
Ionic Framework Version: 2.0.0-rc.0
Ionic CLI Version: 2.1.0-beta.3
Ionic App Lib Version: 2.1.0-beta.1
ios-deploy version: 1.9.0
ios-sim version: 5.0.8
OS: Mac OS X El Capitan
Node Version: v6.7.0
Xcode version: Xcode 8.0 Build version 8A218a
I noticed that even an error occurs somewhere, the build process won’t exit and as a result you will get the impression that the process completed “successfully”. Later, when you run the application at the mobile, you realise that the main.js file is missing.
[16:38:01] bundle prod started …
[16:38:01] Error: Could not resolve entry (.tmp/app/main.prod.js)
at /users/blah/repo/app/node_modules/rollup/dist/rollup.js:8602:28
My main.prod.ts file looks like this
import { platformBrowser } from ‘@angular/platform-browser’;
import { enableProdMode } from ‘@angular/core’;
import { AppModuleNgFactory } from ‘./app.module.ngfactory’;
I see a ts compiler error for app.module.ngfactory, not sure what I am missing
I setup my app.module following https://github.com/driftyco/ionic-conference-app/blob/master/src/app/app.module.ts. If I copy the main.js generated at ionic serve into ios build it works.