No exported member 'IonicPageModule'


#1

Hi - followed instructions in the changelog to update package.json for ionic 3.0, mostly for the purposes of getting IonicPage and deeplinking working.

app.component.ts immediately throws an error when I try to import import { IonicPageModule } from 'ionic-angular';

[ts] Module ‘"/Users/Work/Lavanda/IonicProjects/thunderball/node_modules/ionic-angular/index"’ has no exported member ‘IonicPageModule’.

and:

typescript: src/app/app.component.ts, line: 29
        Cannot find name 'IonicPage'.

  L29:  @IonicPage({
  L30:    name: 'password-set',

package.json is as follows and I have deleted node_modules and npm installed again after updating it:

"engines": {
"node": "7.8.0",
"npm": "4.4.4"
  },
  "config": {
    "ionic_sass": "sass.config.js"
  },
  "dependencies": {
    "@angular/common": "4.0.0",
    "@angular/compiler": "4.0.0",
    "@angular/compiler-cli": "4.0.0",
    "@angular/core": "4.0.0",
    "@angular/forms": "4.0.0",
    "@angular/http": "4.0.0",
    "@angular/platform-browser": "4.0.0",
    "@angular/platform-browser-dynamic": "4.0.0",
    "@ionic-native/core": "3.4.2",
    "@ionic-native/in-app-browser": "3.4.2",
    "@ionic-native/splash-screen": "3.4.2",
    "@ionic/storage": "2.0.1",
    "@types/c3": "^0.4.41",
    "angular2-fullcalendar": "^1.0.19",
    "c3": "^0.4.11",
    "express": "^4.15.2",
    "intl": "^1.2.5",
    "ion2-calendar": "^1.0.5",
    "ionic-angular": "3.0.1",
    "ionic2-calendar": "^0.2.4",
    "ionicons": "3.0.0",
    "moment": "^2.18.1",
    "pouchdb": "^6.1.2",
    "rxjs": "5.1.1",
    "sw-toolbox": "3.4.0",
    "typings": "^2.1.0",
    "zone.js": "^0.8.4"
  },
  "devDependencies": {
    "@ionic/app-scripts": "1.3.0",
    "@types/c3": "^0.4.41",
    "c3": "^0.4.11",
    "typescript": "~2.2.1"
  }
}

#2

Silly question, but did you run npm i after upgrading package.json like that? It almost looks like you don’t really have ionic-angular 3.


#3

yes - exactly my initial thought so I ended up doing it twice.


#4

So I looked in node_modules/ionic-angular/umd/index.d.ts of a project with 3.0.1 installed, and starting at line 293, I have this:

export declare class IonicPageModule {
    static forChild(page: any): ModuleWithProviders;
}

Do you?


#5

I am having this same problem with Ionic 3.0.1, and I do see this export declared on line 293 of this index file. Any more suggestions?


#6

similarly i do not have ‘IonicPage’,
How to Export manually ?