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
ng build
– Unipersonalng build
completed successfully – Laband"buildOptimizer": false
inangular.json
is working fine. whentrue
, it is giving the above error. – Laband@media all {}
that give me an error, I just had to remove it and it worked flawlessly this is the bug report – Voluntarismng serve --prod
. You should be able to find the error. – By