1

Angular CLI build fails with below:

ng build
√ Browser application bundle generation complete.
√ Copying assets complete.
× Index html generation failed.
undefined:8:53494: property missing ':'

I found this is because of my CSS file linked in angular.json

"styles": [ "src/assets/css/cui-standard.min.css"]

I tried to disable inlineCritical but with no luck:

"optimization": {
              "scripts": true,
              "fonts": { "inline": true },
              "styles": { "minify": true, "inlineCritical": false }
            }

Any help would be appreciated.

R. Richards
  • 24,603
  • 10
  • 64
  • 64
Rado
  • 11
  • 2
  • Sounds like it's complaining about something on line 8 column 53494 of that `cui-standard.min.css` minified CSS file. Might be kind of hard to troubleshoot without seeing that file. Can you maybe post a snippet of that file, starting a little bit before the referenced column number (and let us know the position you copied from)? Or maybe try included the non-minified version instead (if available) - it will probably also error out, but hopefully be a bit easier to troubleshoot. – Lukas S. Jul 13 '21 at 16:49
  • I used the stylesheet in the instead and it works now: For some reason it was failing to build when included with the application. – Rado Jul 13 '21 at 20:01
  • hi Rado if you using the inline external fonds like google fonts the internet required for build time also make inline critical to true for more detils https://angular.io/guide/workspace-config#optimization-configuration – hazan kazim Mar 31 '22 at 13:39

0 Answers0