These are chat archives for angular/angular-2-ionic-2

3rd
Feb 2017
Antonio Gallo
@badpenguin
Feb 03 2017 15:45
Is there a way to debug angular2 bootstrap? I've 10-12 seconds of loading time with an Asus Zenfone Android and that the time between index.html get loaded and the App constructor got called (8.5sec) plus 1.5 sec to fire the ready promises from Platform.
Scandicloud
@scandicloud_twitter
Feb 03 2017 15:51
Hey guys. My computer died mid compilation, and now I can't get my Ionic app to compile again.
Have tried rm -rf node_modules/ platforms/, npm install and added the android platform again.
Have even tried git cloning the project again, from a commit from yesterday.
Andrew Graham-Yooll
@andrewgy8
Feb 03 2017 15:52
@scandicloud_twitter What are your exact errors?
Scandicloud
@scandicloud_twitter
Feb 03 2017 15:53
[16:48:56]  TypeError: Cannot read property 'text' of undefined 
[16:48:56]  ngc failed 
[16:48:56]  ionic-app-script task: "build" 
[16:48:56]  Error: Error
Andrew Graham-Yooll
@andrewgy8
Feb 03 2017 15:55
I cant say for sure what the exact cause of this is because it could be anything. What I usually do when Im in your situation is find that location of the error (itll say in the stack trace) , find that file and then go to the line and see exactly where the error stems from.
Scandicloud
@scandicloud_twitter
Feb 03 2017 15:59
$ ionic run android --device --stacktrace

Running 'run:before' npm script before run

> ionic-hello-world@ build /home/unknown/git/app
> ionic-app-scripts build

[16:58:13]  ionic-app-scripts 0.0.36 
[16:58:13]  build prod started ... 
[16:58:13]  clean started ... 
[16:58:13]  clean finished in 3 ms 
[16:58:13]  copy started ... 
[16:58:13]  ngc started ... 
[16:58:13]  copy finished in 65 ms 
[16:58:13]  lint started ... 
[16:58:15]  lint finished in 1.85 s 
[16:58:22]  TypeError: Cannot read property 'text' of undefined 
[16:58:22]  ngc failed 
[16:58:22]  ionic-app-script task: "build" 
[16:58:22]  Error: Error 

npm ERR! Linux 4.4.0-59-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
npm ERR! node v7.4.0
npm ERR! npm  v4.0.5
npm ERR! code ELIFECYCLE
npm ERR! ionic-hello-world@ build: `ionic-app-scripts build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ionic-hello-world@ build script 'ionic-app-scripts build'.
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
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! Please include the following file with any support request:
npm ERR!     /home/unknown/git/app/npm-debug.log
This is the complete stack trace. There's no reference to any line at all, and everything worked great until the computer died mid compilation. So strange.
Andrew Graham-Yooll
@andrewgy8
Feb 03 2017 16:00
Are you using ngrx?
Scandicloud
@scandicloud_twitter
Feb 03 2017 16:01
I'm using rxjs, is it the same?
Andrew Graham-Yooll
@andrewgy8
Feb 03 2017 16:02
I had a similar issue with that library and had to comment out a couple of things for my builds to work.
Antonio Gallo
@badpenguin
Feb 03 2017 16:02
maybe make sure wich typescript you are using, it must be max 2.0.9 AFAIK
Andrew Graham-Yooll
@andrewgy8
Feb 03 2017 16:02
I should be more specific, ngRx-Stre/Effects?
Scandicloud
@scandicloud_twitter
Feb 03 2017 16:06
I have 2.1.5!! could that be the problem?
Andrew Graham-Yooll
@andrewgy8
Feb 03 2017 16:06
Yes
Antonio Gallo
@badpenguin
Feb 03 2017 16:08
AFAIK ionic2 2.0.0 works with typescript=2.0.9 - It surely fails for me with TS 2.2.0
Scandicloud
@scandicloud_twitter
Feb 03 2017 16:09
THANKS GUYS. That solved it!
<3
Antonio Gallo
@badpenguin
Feb 03 2017 16:10
@scandicloud_twitter good for you :) its 20 days i'm trying to find this slowness problem :-P
Scandicloud
@scandicloud_twitter
Feb 03 2017 16:11

Sorry for stepping in right after your question @badpenguin , back to your question:

Is there a way to debug angular2 bootstrap? I've 10-12 seconds of loading time with an Asus Zenfone Android and that the time between index.html get loaded and the App constructor got called (8.5sec) plus 1.5 sec to fire the ready promises from Platform.

Antonio Gallo
@badpenguin
Feb 03 2017 16:12
@scandicloud_twitter no problem... i think it will not solved until lazy module loading will be implemented into Ionic2 too.