Page: /start/q/integration/angular
Feedback:
When I follow these instructions the application will run with ng build. However, when running ng build --prod the resulting distribution will not run either locally or with the amplify console. The browser inevitably throws the error
ERROR TypeError: Cannot read property 'aws_appsync_region' of null (on chrome)
or
ERROR TypeError: "r is null" (on firefox)
I've tried this mostly with Angular 10.1.1. I also tried downgrading to angular 9 with the same result.
Hi @BenjaminNielsen, thanks for reporting the issue! I was able to reproduce it so I'll have this issue transferred to our js repo.
+1 on this - my production build just failed when I deployed AWS Console build. Not having production working should make this issue priority 1? Any updates?
Thanks for the report! We're working on it!
For a quick fix, you can manually register Auth via Amplify.register(Auth):
https://github.com/aws-amplify/amplify-js/issues/6761#issuecomment-697164608
For a quick fix, you can manually register Auth via
Amplify.register(Auth):
I was able to push a production build to amplify console after following your suggestion. Thank you!
Hi @BenjaminNielsen and @malcomm, sorry about the delay. We just pushed pr #6867 to latest that addresses this. Please try again with the latest amplify and let us know if this solves your issue. Thank you!
Hi @BenjaminNielsen and @malcomm, sorry about the delay. We just pushed pr #6867 to
latestthat addresses this. Please try again with the latest amplify and let us know if this solves your issue. Thank you!
I can confirm prod build are now working for me. Thanks so much!
Most helpful comment
Hi @BenjaminNielsen, thanks for reporting the issue! I was able to reproduce it so I'll have this issue transferred to our js repo.