[popTo() Error] Ionic Cordova Error [popTo()]


When the error below happens in compiling Cordova Ionic App after you delete the Modules folder to clean install all the plugins, just follow what the error is saying and navigate to that function at the location indicated by the error and remove the parameter from the popTo() function. Save and compile. The error should go.

The Error is shown below:
[18:50:42]  typescript: node_modules/ionic-angular/navigation/nav-controller-base.d.ts, line: 57
            Property 'popTo' in type 'NavControllerBase' is not assignable to the same property in base type
            'NavController'. Type '(indexOrViewCtrl: any, opts?: NavOptions, done?: Function) => Promise
            assignable to type '(page: any, params?: any, opts?: NavOptions, done?: Function) => Promise
            parameters 'done' and 'opts' are incompatible. Type 'NavOptions' is not assignable to type 'Function'.
            Property 'apply' is missing in type 'NavOptions'.

      L56:  pop(opts?: NavOptions, done?: Function): Promise
      L57:  popTo(indexOrViewCtrl: any, opts?: NavOptions, done?: Function): Promise
      L58:  popToRoot(opts?: NavOptions, done?: Function): Promise

Error: Failed to transpile program
    at new BuildError (/node_modules/@ionic/app-scripts/dist/util/errors.js:16:28)
    at /node_modules/@ionic/app-scripts/dist/transpile.js:159:20
    at new Promise (
    at transpileWorker (/node_modules/@ionic/app-scripts/dist/transpile.js:107:12)
    at Object.transpile (/node_modules/@ionic/app-scripts/dist/transpile.js:64:12)
    at /node_modules/@ionic/app-scripts/dist/build.js:109:82
    at
[18:50:43]  copy finished in 40.01 s



Android
published
v.0.01





For peering opportunity Autonomouse System Number: AS401345 Custom Software Development at ErnesTech Email AddressContact: [email protected]