Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular 11 stuck on "Generating browser application bundles (phase: building)"

Tags:

angular

Everything is working fine yesterday, today when start my angular 11 project, I got stock on "/ Generating browser application bundles (phase: building)..." have anyone experienced this, or can give me advice on how to move forward.

enter image description here

like image 813
luna moonfang Avatar asked Jan 02 '21 08:01

luna moonfang


2 Answers

Just keep in mind that you might have to do some changes in your angular.json file.

  1. In architect > build > configuration section add:
"development": {
  "buildOptimizer": false,
  "optimization": false,
  "vendorChunk": true,
  "extractLicenses": false,
  "sourceMap": true,
  "namedChunks": true
},
  1. In architect > build
"defaultConfiguration": "production"
  1. In architect > serve > configuration section add:
 "development": {
   "browserTarget": "{{PROJECT_NAME}}:build:development"
  }

Note: You should put the actual project name in the place of {{PROJECT_NAME}} e.g. "browserTarget": "my-project:build:development"

  1. In architect > serve section add:
"defaultConfiguration": "development"
like image 83
Mohammad Jamal Dashtaki Avatar answered Oct 28 '22 07:10

Mohammad Jamal Dashtaki


Same error here.

Cause: There was a .css file wich only contained comments.

Solution: Delete all comments in this file, or add at least one css class.

like image 40
stroboshaver Avatar answered Oct 28 '22 07:10

stroboshaver