I have a problem while uploading my angular application to production . The application works just fine in development and used to work before on production too.
To bui
we also got same issue.Once remove all the node modules and install one by one node modules.After installing every node module enter ng build --prod it may help.In one project we got that error in ngx password toggle node module.
after a long time of trying, I discovered that there is an open bug at angular cli
https://github.com/angular/angular-cli/issues/9929
ng build --prod --base-href="/site/" --aot=false --build-optimizer=false
and for now using --aot=false --build-optimizer=false
temporarily solves the problem.
Ill keep the post updated with official the information and solution that angular team will provide.