Cannot find Ionic-angular module

Arman Davari

I'm Learning Ionic v4 and the template are compiled successfully. But when I change these template to components examples like this one below, It gives error that I mention below.

What did i do wrong? And if the process I made for testing alert is wrong, how can I test codes and add pages in ionic?

I would be grateful if anyone can help me learn to use ionic. I have project to deliver in 2 weeks Thanks

import { Component } from '@angular/core';

import { AlertController } from 'ionic-angular';


@Component({
  templateUrl: 'template.html'
})
export class BasicPage {

  constructor(public alerCtrl: AlertController) { }

  doAlert() {
    let alert = this.alerCtrl.create({
      title: 'New Friend!',
      message: 'Your friend, Obi wan Kenobi, just approved your 
friend request!',
      buttons: ['Ok']
    });
    alert.present()
  }

}

ERROR in ./src/app/tab3/tab3.module.ts 16:58- 66 [ng] "export 'Tab3Page' was not found in './tab3.page' [ng] ERROR in ./src/app/tab3/tab3.module.ts 18:23- 31 [ng] "export 'Tab3Page' was not found in './tab3.page' [ng] ERROR in ./src/app/tab3/tab3.page.ts [ng] Module not found: ./src/app/tab3/tab3.page.ts [ng] Module not found: Error: Can't resolve 'ionic-angular' in 'C:\Users\ASUS\Ionic\ app\src\app\tab3' [ng] Time: 797ms [ng] i 「wdm」: Failed to compile. [ng] [ng] ERROR in src/app/tab3/tab3.module.ts(6,10): error TS2305: Module '"C:/Users/ASUS/Ionic/app /src/app/tab3/tab3.page"' has no exported member 'Tab3Page'. [ng] src/app/tab3/tab3.page.ts(3,33): error TS2307: Cannot find module 'ionic-angular'**

user11907741

There are various update in Ionic4.

import { AlertController } from '@ionic/angular';  // Ionic 4

import { AlertController } from 'ionic/angular';  // Ionic 3

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Ionic/Angular Issue Cannot find module './fs'

From Dev

Error: Cannot find module "rxjs/operators" in Ionic Angular

From Dev

Ionic 3 Angular 4 Cannot find module `jsonwebtoken`

From Dev

Ionic firestore Cannot find module "@angular/fire/firestore"

From Dev

angular Cannot find module

From Dev

Cannot find module @ionic/angular (ionic 4) from test-file

From Dev

Cannot find module 'ionic-angular'.ts when version upgraded to Ionic 4

From Dev

Dynamic Environment Variables in Ionic - Cannot find module

From Dev

Cannot find module generated with “Ionic g provider”

From Dev

Ionic 2 - Runtime error Cannot find module "."

From Dev

Ionic 2 cannot find module 'dgram'

From Dev

Cannot find module "ionic-native"

From Dev

Ionic => Runtime error: Cannot find module "."

From

Cannot find module angular/animations

From

Cannot find module 'webpack' - Angular

From

Cannot find module '@angular/compiler'

From Dev

Angular 7 "Cannot find module"

From Dev

Cannot find module in Angular routing

From Dev

Cannot find module angular 8

From Dev

Ionic 4 / Angular Routing: ERROR Error: Uncaught (in promise): Error: Cannot find 'EventHomePageModule' in './home/home.module'

From Dev

Cannot find module '@angular-devkit.../utils' when trying to run ionic on android

From Dev

TS2307: Cannot find module 'ionic/ionic'

From Dev

Runtime Error Cannot find module "ionic-native" IONIC 2

From Dev

Cannot find module '@angular/elements' : Angular 7

From Dev

Cannot find module './util/toSubscriber' in Angular

From Dev

Angular2 cannot find a nested module

From Dev

Error: Cannot find module '@angular/core'

From Dev

TS2307: Cannot find module 'angular'

From Dev

Cannot find module './data.json'. in Angular

Related Related

  1. 1

    Ionic/Angular Issue Cannot find module './fs'

  2. 2

    Error: Cannot find module "rxjs/operators" in Ionic Angular

  3. 3

    Ionic 3 Angular 4 Cannot find module `jsonwebtoken`

  4. 4

    Ionic firestore Cannot find module "@angular/fire/firestore"

  5. 5

    angular Cannot find module

  6. 6

    Cannot find module @ionic/angular (ionic 4) from test-file

  7. 7

    Cannot find module 'ionic-angular'.ts when version upgraded to Ionic 4

  8. 8

    Dynamic Environment Variables in Ionic - Cannot find module

  9. 9

    Cannot find module generated with “Ionic g provider”

  10. 10

    Ionic 2 - Runtime error Cannot find module "."

  11. 11

    Ionic 2 cannot find module 'dgram'

  12. 12

    Cannot find module "ionic-native"

  13. 13

    Ionic => Runtime error: Cannot find module "."

  14. 14

    Cannot find module angular/animations

  15. 15

    Cannot find module 'webpack' - Angular

  16. 16

    Cannot find module '@angular/compiler'

  17. 17

    Angular 7 "Cannot find module"

  18. 18

    Cannot find module in Angular routing

  19. 19

    Cannot find module angular 8

  20. 20

    Ionic 4 / Angular Routing: ERROR Error: Uncaught (in promise): Error: Cannot find 'EventHomePageModule' in './home/home.module'

  21. 21

    Cannot find module '@angular-devkit.../utils' when trying to run ionic on android

  22. 22

    TS2307: Cannot find module 'ionic/ionic'

  23. 23

    Runtime Error Cannot find module "ionic-native" IONIC 2

  24. 24

    Cannot find module '@angular/elements' : Angular 7

  25. 25

    Cannot find module './util/toSubscriber' in Angular

  26. 26

    Angular2 cannot find a nested module

  27. 27

    Error: Cannot find module '@angular/core'

  28. 28

    TS2307: Cannot find module 'angular'

  29. 29

    Cannot find module './data.json'. in Angular

HotTag

Archive