Unable to build an Ionic/Angular app after packages upgrade

I’ve upgraded Ionic and angular packages to the latest version and unable to run ionic build

my dependencies are:

 "@angular/core": "~10.1.4",
 "ionic-angular": "^3.9.10",

And the error I’m getting when trying to build is below:

node_modules/ionic-angular/umd/components/item/item-divider.d.ts:1:22 - error TS2724: Module '"../../../../@angular/core/core"' has no exported member 'Renderer'. Did you mean 'Renderer2'?

1 import { ElementRef, Renderer } from '@angular/core';

    5964 export declare abstract class Renderer2 {
    'Renderer2' is declared here.

Please advise how to make the ionic-angular dependency work.

Totally impossible, sorry. ionic-angular only supports Angular versions up to 5. For anything later than that, you need @ionic/angular.


Makes sense! Thanks for the details. I’ve replaced the old ionic-angular with @ionic\angular package and now the Renderer2 error is gone :sweat_smile: And because I switch to a new package I’m having code compatibility issues. Some classes where renamed (I can find similar, e.g. IonicApp -> IonApp) but some classes are just missing for example IonicPageModule, what is the new class to use in @ionic\angular package?

Is there a migration guide from the old ionic-angular to the new @ionic\angular?


1 Like

Thanks! This is very helpful