suresh
suresh

Reputation: 41

Error: BrowserModule has already been loaded. in angular 7

Error:

BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy-loaded module, import `CommonModule` instead.

After upgrade from Angular 5 to 7, I got this error. please help me out of this issue

Upvotes: 1

Views: 286

Answers (2)

suresh
suresh

Reputation: 41

Fixed By Myself

Global and Local project ng version entirly different.After uninstall global ng version ,the problem was solved.During conflict time i having more than one webpack list .after remove that webpack it working fine

Upvotes: 0

Surjeet Bhadauriya
Surjeet Bhadauriya

Reputation: 7156

Import below modules only once in the root module (app.module.ts):

BrowserModule 
BrowserAnimationsModule 
HttpModule
HttpClientModule

Upvotes: 1

Related Questions