The modul "C:/User... has no exported member 'Page'

Hii I’m trying to create a Uber like app with a tutorial. I get the error message at line 1 for ‘Page’: The modul “C:/User…/node_modules/ionic-angular/index” has no exported member 'Page’
This is my Code

import { Page } from ‘ionic-angular’;
import { MapDirective } from ‘…/…/components/map/map’;

import { NavController } from ‘ionic-angular’;

@Page({
templateUrl: ‘build/pages/home/home.html’,
directives: [MapDirective]
})

export class HomePage {

constructor(public navCtrl: NavController) {

}

onLink(url: string) {
window.open(url);
}
}

I think you mean to use Component, not Page :slight_smile:

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

@Component({
   templateUrl: 'build/pages/home/home.html',
   directives: [MapDirective]
})

No it’s seems that I just forgot to add the “@” sing in the import of ionic-angular. But thank you for pushing me in the right direction :wink:

`import { Page } from '@ionic-angular';

@Page({
templateUrl: 'build/pages/home/home.html',
directives: [MapDirective]
})

`

You are using a relatively ancient version of Ionic and Angular there. If you’re just starting out, I would definitely upgrade first, or you are going to be rewriting a lot of stuff.

+1 with rapropos. You are using an old version.

I tryed to stay up to date with mz packages’ latest version. I checked that with the npm outdated. It shows the current, wanted and latest version. But it seems the problem is not the version of Angular and Ionic. Or am I wrong?

You should get errors trying to import Page then, because it was removed long ago. You also do not want to be declaring directives in components any more.