I am trying to compile an ionic woocommerce application and getting this > ERROR in src/app/address-pages/addresses/addresses.page.ts:5:42 - error TS2305: Module has no exported member 'Events'

I am trying to compile an ionic woocommerce application and getting this > ERROR in src/app/address-pages/addresses/addresses.page.ts:5:42 - error TS2305: Module ‘"…/…/…/…/node_modules/@ionic/angular/ionic-angular"’ has no exported member ‘Events’.

I am trying to compile a new ionic cli project and getting this error

The Ionic CLI will exit. Please check any output above for error details.
Mac-Air:iconic-app username$
[Restored 22. Apr 2020 at 11:55:54]
Last login: Wed Apr 22 11:41:36 on console
Mac-Air:iconic-app username$ ionic serve

ng run app:serve --host=localhost --port=8100
[ng] chunk {main} main.js, main.js.map (main) 2.02 kB [initial] [rendered]
[ng] chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 154 kB [initial] [rendered]
[ng] chunk {runtime} runtime.js, runtime.js.map (runtime) 6.15 kB [entry] [rendered]
[ng] chunk {styles} styles.js, styles.js.map (styles) 94.1 kB [initial] [rendered]
[ng] chunk {vendor} vendor.js, vendor.js.map (vendor) 339 kB [initial] [rendered]
[ng] Date: 2020-04-22T10:06:16.564Z - Hash: f3db0ef1e42df73f8bdc - Time: 15207ms
[ng] ERROR in src/app/address-pages/addresses/addresses.page.ts:5:42 - error TS2305: Module ‘"…/…/…/…/node_modules/@ionic/angular/ionic-angular"’ has no exported member ‘Events’.
[ng] 5 import { ModalController, NavController, Events } from ‘@ionic/angular’;
[ng] ~~~~~~
[ng] src/app/app.component.ts:3:35 - error TS2305: Module ‘"…/…/node_modules/@ionic/angular/ionic-angular"’ has no exported member ‘Events’.
[ng] 3 import { Platform, NavController, Events, ModalController, MenuController } from ‘@ionic/angular’;
[ng] ~~~~~~
[ng] src/app/cart/cart.page.ts:6:25 - error TS2305: Module ‘"…/…/…/node_modules/@ionic/angular/ionic-angular"’ has no exported member ‘Events’.
[ng] 6 import { NavController, Events, ModalController, ActionSheetController } from ‘@ionic/angular’;
[ng] ~~~~~~
[ng] src/app/downloads/downloads.page.ts:3:25 - error TS2305: Module ‘"…/…/…/node_modules/@ionic/angular/ionic-angular"’ has no exported member ‘Events’.
[ng] 3 import { NavController, Events } from ‘@ionic/angular’;
[ng] ~~~~~~
[ng] src/app/home-pages/home/home.page.ts:2:10 - error TS2305: Module ‘"…/…/…/…/node_modules/@ionic/angular/ionic-angular"’ has no exported member ‘Events’.
[ng] 2 import { Events, IonSlides } from ‘@ionic/angular’;
[ng] ~~~~~~
[ng] src/app/home-pages/home10/home10.page.ts:2:25 - error TS2305: Module ‘"…/…/…/…/node_modules/@ionic/angular/ionic-angular"’ has no exported member ‘Events’.
[ng] 2 import { NavController, Events } from ‘@ionic/angular’;
[ng] ~~~~~~
[ng] src/app/home-pages/home2/home2.page.ts:3:22 - error TS2305: Module ‘"…/…/…/…/node_modules/@ionic/angular/ionic-angular"’ has no exported member ‘Events’.
[ng] 3 import { IonContent, Events } from ‘@ionic/angular’;
[ng] ~~~~~~
[ng] src/app/home-pages/home3/home3.page.ts:2:10 - error TS2305: Module ‘"…/…/…/…/node_modules/@ionic/angular/ionic-angular"’ has no exported member ‘Events’.
[ng] 2 import { Events, IonSlides } from ‘@ionic/angular’;
[ng] ~~~~~~
[ng] src/app/home-pages/home4/home4.page.ts:3:25 - error TS2305: Module ‘"…/…/…/…/node_modules/@ionic/angular/ionic-angular"’ has no exported member ‘Events’.
[ng] 3 import { NavController, Events } from ‘@ionic/angular’;
[ng] ~~~~~~
[ng] src/app/home-pages/home5/home5.page.ts:2:25 - error TS2305: Module ‘"…/…/…/…/node_modules/@ionic/angular/ionic-angular"’ has no exported member ‘Events’.
[ng] 2 import { NavController, Events } from ‘@ionic/angular’;
[ng] ~~~~~~
[ng] src/app/home-pages/home6/home6.page.ts:2:25 - error TS2305: Module ‘"…/…/…/…/node_modules/@ionic/angular/ionic-angular"’ has no exported member ‘Events’.
[ng] 2 import { NavController, Events, IonContent } from ‘@ionic/angular’;
[ng] ~~~~~~
[ng] src/app/home-pages/home7/home7.page.ts:2:25 - error TS2305: Module ‘"…/…/…/…/node_modules/@ionic/angular/ionic-angular"’ has no exported member ‘Events’.
[ng] 2 import { NavController, Events, IonContent, IonSlides, IonInfiniteScroll } from ‘@ionic/angular’;
[ng] ~~~~~~
[ng] src/app/home-pages/home8/home8.page.ts:2:25 - error TS2305: Module ‘"…/…/…/…/node_modules/@ionic/angular/ionic-angular"’ has no exported member ‘Events’.
[ng] 2 import { NavController, Events } from ‘@ionic/angular’;
[ng] ~~~~~~
[ng] src/app/home-pages/home9/home9.page.ts:2:25 - error TS2305: Module ‘"…/…/…/…/node_modules/@ionic/angular/ionic-angular"’ has no exported member ‘Events’.
[ng] 2 import { NavController, Events, IonContent, IonInfiniteScroll } from ‘@ionic/angular’;
[ng] ~~~~~~
[ng] src/app/intro/intro.page.ts:2:25 - error TS2305: Module ‘"…/…/…/node_modules/@ionic/angular/ionic-angular"’ has no exported member ‘Events’.
[ng] 2 import { NavController, Events } from ‘@ionic/angular’;
[ng] ~~~~~~
[ng] src/app/modals/login/login.page.ts:4:42 - error TS2305: Module ‘"…/…/…/…/node_modules/@ionic/angular/ionic-angular"’ has no exported member ‘Events’.
[ng] 4 import { ModalController, NavController, Events, NavParams } from ‘@ionic/angular’;
[ng] ~~~~~~
[ng] src/app/modals/scratch-card/scratch-card.page.ts:2:36 - error TS2305: Module ‘"…/…/…/…/node_modules/@ionic/angular/ionic-angular"’ has no exported member ‘Events’.
[ng] 2 import { NavController, NavParams, Events, PopoverController } from ‘@ionic/angular’;
[ng] ~~~~~~
[ng] src/app/modals/select-country/select-country.page.ts:3:27 - error TS2305: Module ‘"…/…/…/…/node_modules/@ionic/angular/ionic-angular"’ has no exported member ‘Events’.
[ng] 3 import { ModalController, Events, IonSearchbar, NavParams } from ‘@ionic/angular’;
[ng] ~~~~~~
[ng] src/app/modals/select-zones/select-zones.page.ts:2:53 - error TS2305: Module ‘"…/…/…/…/node_modules/@ionic/angular/ionic-angular"’ has no exported member ‘Events’.
[ng] 2 import { ModalController, NavParams, NavController, Events } from ‘@ionic/angular’;
[ng] ~~~~~~
[ng] src/app/news/news.page.ts:2:44 - error TS2305: Module ‘"…/…/…/node_modules/@ionic/angular/ionic-angular"’ has no exported member ‘Events’.
[ng] 2 import { IonInfiniteScroll, NavController, Events } from ‘@ionic/angular’;
[ng] ~~~~~~
[ng] src/app/notifications/notifications.page.ts:2:63 - error TS2305: Module ‘"…/…/…/node_modules/@ionic/angular/ionic-angular"’ has no exported member ‘Events’.
[ng] 2 import { IonInfiniteScroll, NavController, PopoverController, Events } from ‘@ionic/angular’;
[ng] ~~~~~~
[ng] src/app/product-detail/product-detail.page.ts:2:42 - error TS2305: Module ‘"…/…/…/node_modules/@ionic/angular/ionic-angular"’ has no exported member ‘Events’.
[ng] 2 import { NavController, ModalController, Events } from ‘@ionic/angular’;
[ng] ~~~~~~
[ng] src/app/products/products.page.ts:2:67 - error TS2305: Module ‘"…/…/…/node_modules/@ionic/angular/ionic-angular"’ has no exported member ‘Events’.
[ng] 2 import { IonInfiniteScroll, IonContent, IonSlides, NavController, Events, ActionSheetController, MenuController } from ‘@ionic/angular’;
[ng] ~~~~~~
[ng] src/app/settings/settings.page.ts:2:27 - error TS2305: Module ‘"…/…/…/node_modules/@ionic/angular/ionic-angular"’ has no exported member ‘Events’.
[ng] 2 import { ModalController, Events, Platform, NavController } from ‘@ionic/angular’;
[ng] ~~~~~~
[ng] src/app/thank-you/thank-you.page.ts:2:25 - error TS2305: Module ‘"…/…/…/node_modules/@ionic/angular/ionic-angular"’ has no exported member ‘Events’.
[ng] 2 import { NavController, Events } from ‘@ionic/angular’;
[ng] ~~~~~~
[ng] src/components/categories/categories.component.ts:4:25 - error TS2305: Module ‘"…/…/…/node_modules/@ionic/angular/ionic-angular"’ has no exported member ‘Events’.
[ng] 4 import { NavController, Events } from ‘@ionic/angular’;
[ng] ~~~~~~
[ng] src/components/product/product.component.ts:3:27 - error TS2305: Module ‘"…/…/…/node_modules/@ionic/angular/ionic-angular"’ has no exported member ‘Events’.
[ng] 3 import { ToastController, Events, ModalController, NavController } from ‘@ionic/angular’;
[ng] ~~~~~~
[ng] src/providers/config/config.service.ts:9:20 - error TS2305: Module ‘"…/…/…/node_modules/@ionic/angular/ionic-angular"’ has no exported member ‘Events’.
[ng] 9 import { Platform, Events } from ‘@ionic/angular’;
[ng] ~~~~~~
[ng] src/providers/shared-data/shared-data.service.ts:13:37 - error TS2305: Module ‘"…/…/…/node_modules/@ionic/angular/ionic-angular"’ has no exported member ‘Events’.
[ng] 13 import { Platform, ToastController, Events, AlertController } from ‘@ionic/angular’;
[ng] ~~~~~~

[INFO] Development server running!

   Local: http://localhost:8100
   
   Use Ctrl+C to quit this process

[INFO] Browser window opened to http://localhost:8100!

Take a look at the changelog for ionic v5.

Thanks for the tip. I managed to get it to work later.