If you are getting the error An unhandled exception occurred: The 'buildOptimizer' option cannot be used without 'aot'. or some variation of that while using ng build or ng deploy, then here is the solution that worked for me (scroll down).
angular.json file"buildOptimizer" to true and add "aot" to true as wellThe above commands should work now.
ADDON: If you have that problem with ng serve or ng test, you could try replacing build in step 2 with serve or test respectively (Disclaimer: I have not tested that).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With