Angular 2 Module has no exported member

I had this issue even when I had correctly exported the class on my other file. Rebooting my machine fixed it.


If you see this error in any @angular modules like router, core, then make sure it is because of the version mismatch of the libraries. Generally all your @angular modules should be of the same version except router.

for Ex:

    "@angular/common": "2.2.3",
    "@angular/compiler": "2.2.3",
    "@angular/core": "2.2.3",
    "@angular/platform-browser": "2.2.3",
    "@angular/platform-browser-dynamic": "2.2.3",
    "@angular/router": "^3.3.0" <= Version mismatch***

the following combination throws following error

has no exported member

I changed the router version to

"@angular/router": "^3.0.0"

The error is resolved.

So, until everything is stable stick with your working combination.


You should have something like that in your home.main module:

@Component({
  (...)
})
export class AppComponent {
}