Search code examples
angularangular2-routingangular2-cli

Angular2 has no exported mng error


I have a lot of errors after updating an angular2 project from RC2 to Final 2.0.0

Most of them read: has no exported mng 'such and such'

Since I just got started with angular2 it would be great if someone could point me into a general direction/pattern on how to resolve such issues (generally, for debugging in the future etc)?

To name a few:

has no exported mng 'provideRouter'
has no exported mng 'RouterConfig'
has no exported mng 'ROUTER_DIRECTIVES'
has no exported mng 'addProviders'

Solution

  • This seem to be errors from upgrading angular to the 2.0.0 version.

    For each error you can look in the changelog of Angular github and find an answer there.

    https://github.com/angular/angular/blob/d5515473bfd0974bacb0e7e5870e772426c9088d/CHANGELOG.md

    For example: addProviders

     testing:
        withProviders, use TestBed.withModule instead
        addProviders, use TestBed.configureTestingModule instead