Upgraded the Angular 10 project to Angular 12. But now on running production build, it is giving error
Index HTML generation failed.
undefined:6:720366 missing '}'
ng build --configuration production --aot
It is very difficult to find the error because it points to the generated HTML file. Node log will no do much.
The content of index.html
<!doctype html>
<html lang="en">
<head>
<title>Quiz - Admin</title>
<base href="/">
<meta charset="utf-8">
</head>
<body>
<app></app>
</body>
</html>
While running the development build, locally does not give any error, even ng build completed successfully
Please check the build pipeline here: https://github.com/anuj9196/quiz-app/runs/2589355739?check_suite_focus=true#step:7:56
The error is not in the index.html file that you see in the folder structure. It occurs on generating the final index.html. This is a compilation error probably in the css/scss files (as the typescript seem to compile correctly). Make sure you have all curly brackets } closed in your css files.