I upgraded from angular 11 to angular 12 and my build is failing when using configuration production. The following error appears:
Cannot read property 'visit' of undefined. Error picture
I saw that if I set the flag for AOT to false in angular.json the build is successful. Do you have any ideas what should I try next?