Forum Discussion

vijit-devops's avatar
vijit-devops
Copper Contributor
Jan 08, 2022
Solved

Angular build showing BrowserModule has already been loaded on browser

Hi,

I have angular build pipeline at Azure DevOps and it is successfully deployed to the Azure App service.

 

The issue I am facing is while on selecting specific option it is not responding. and getting below error:

 

main-es2017.3ab685c8fd4c22c3c48d.js:1 ERROR Error: Uncaught (in promise): 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.
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.

 

Rest options are working fine.

Even already existing pipelines are working fine as well

 

Please let me know is there any new update for the angular pipeline or something has to update at Code end.

  • tbsouza: Please remove the import for the BrowserModule from any other module because it is already imported in the AppModule when you create the Angular application. You should only import the CommonModule in all other modules.

    Hope it helps!!  :smile:

4 Replies

    • tbsouza's avatar
      tbsouza
      Copper Contributor

      Asma_Gh 
      I am facing the same problem. I already checked the BrowserModule and it is only imported on app.module. I don't know how to fix it.

      • bhaikaju's avatar
        bhaikaju
        Icon for Microsoft rankMicrosoft

        tbsouza: Please remove the import for the BrowserModule from any other module because it is already imported in the AppModule when you create the Angular application. You should only import the CommonModule in all other modules.

        Hope it helps!!  :smile:

Resources