Navigation controller fails after upgrade to 3


#1

I am trying to upgrade to ionic 3 from 2.
It has taken some time but I now have the app running on my phone. The initial page is a pin input page then the user is sent to the home page using setRoot thus

this.navCtrl.setRoot(OtpPage, null, {
       animate: false
});

This piece of code just does not function. No action is taken when it is run. I tried with and without animation. This works fine in Ionic 2.

The only error in the logs points to this line in main.js

    console.error.apply(console, values);

Which does not help much.
Any idea what I can do? This is found when running

ionic cordova run android --device

This is my info output

cli packages: (D:\myapp\myapp\node_modules)

    @ionic/cli-utils  : 1.19.0
    ionic (Ionic CLI) : 3.19.0

global packages:

    cordova (Cordova CLI) : 8.0.0

local packages:

    @ionic/app-scripts : 1.3.7
    Cordova Platforms  : android 6.2.3 ios 4.4.0
    Ionic Framework    : ionic-angular 3.2.1

System:

    Android SDK Tools : 26.0.2
    Node              : v6.12.2
    npm               : 3.10.10
    OS                : Windows 10

Environment Variables:

    ANDROID_HOME : C:\Users\me\AppData\Local\Android\sdk

Misc:

    backend : legacy

#2

I fixed it in the end. I continued to upgrade through the versions until I got to 3.3.0 where it recommends that the declarations.d.ts file is removed. I did this then got compilation errors regarding loading a local json file. Fixing these using the 3.x http module get to get the local file fixed the issue.