question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feedback]Application doesn't work for Angular production builds

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
wlee221commented, Sep 15, 2020

Hi @BenjaminNielsen, thanks for reporting the issue! I was able to reproduce it so I’ll have this issue transferred to our js repo.

1reaction
BenjaminNielsencommented, Sep 25, 2020

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!

I can confirm prod build are now working for me. Thanks so much!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular 4 app won't work when built for production
I have reinstalled Angular CLI and created a new app, I copied the old code (the index.html and app files) into the new...
Read more >
Deployment - Angular
When you are ready to deploy your Angular application to a remote server, ... The command builds your application and uploads the production...
Read more >
How to Optimize your Angular App - Glovory Tech
If you are using angular-cli make sure you specify the “build-optimizer” flag for your production build. This will disable the vendor chunk and...
Read more >
Speed Up Your Angular App - 14 Angular Optimization Tips
Here, we'll give 14 tips on how to make your Angular app smaller, faster, and more responsive.
Read more >
How to bundle an Angular app for production? - GeeksforGeeks
The ng build command generates output files just once and doesn't serve them. Steps Before following the steps to deploy the application, make ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found