I\'ve updated my application to RC6 and now i keep getting this error:
zone.js:484 Unhandled Promise rejection: BrowserModule has already been loade
None of the answers worked for me.
For people still looking for an answer and if you are using a SharedModule (and lazy loading) my answer may help you.
Solution: Move following exports: BrowserModule, BrowserAnimationsModule, HttpModule and HttpClientModule (from SharedModule) to imports in AppModule.
Example:
OLD shared.module.ts:
@NgModule({
declarations: [],
imports: [],
exports: [
BrowserModule,
BrowserAnimationsModule,
HttpClientModule,
// ...
]
})
export class SharedModule { }
OLD app.module.ts:
@NgModule({
declarations: [
AppComponent,
],
imports: [
SharedModule
],
providers: [],
exports: [],
bootstrap: [AppComponent]
})
export class AppModule { }
NEW shared.module.ts:
@NgModule({
declarations: [],
imports: [],
exports: [
// ...
]
})
export class SharedModule { }
NEW app.module.ts:
@NgModule({
declarations: [
AppComponent,
],
imports: [
BrowserModule,
BrowserAnimationsModule,
HttpClientModule,
SharedModule
],
providers: [],
exports: [],
bootstrap: [AppComponent]
})
export class AppModule { }