Closed Khumain closed 11 months ago
Hi @Khumain thanks for opening this issue. It sounds like the main problem is when deploying to hosting and some deployment config needs to be adjusted. I'm transferring this issue over to the Hosting repo for better assistance.
Had same issue!
Fixed it with using Angular 16 build config (angular.json)
Problem is you can't use "ng serve" with angular 16 So I created 2 different file named
Thank you for your help! I managed to fix it on my side as well, gotta change the amplify.yml and use baseDirectory: dist/project/browser
with Angular 17 instead of baseDirectory: dist/project
.
Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.
This issue has been automatically locked.
Before opening, please confirm:
JavaScript Framework
Angular
Amplify APIs
Not applicable
Amplify Categories
hosting
Environment information
Describe the bug
Hello wonderful team and community,
I am having an issue with my Angular app after upgrading everything to Angular 17 and Amplify 6. Previously, I was on Angular 16 and Amplify 5, and frontend deployment worked perfectly. However, it does not seem to work anymore.
To check if a basic Angular project would work, I created a brand new "amplify-app" project with
ng new amplify-app
with CSS and without SSR, andamplify init
. I added the parameters in tsconfig.json for strict mode. Furthermore, I added the polyfills following the guide. Finally, I usedamplify add hosting
with manual deployment. After doingamplify publish
, I was surprised that the hosted url brings me to an empty page with 404 errors in the console. Locally, the default Angular page opens but not with the deployed website.As such, I am unable to use all the new functionalities of Angular 17 and Amplify 6 that are ready for production...
Can you help me out with this? Thank you very much!
Expected behavior
Basic Angular website deployed and running on Amplify Hosting.
Reproduction steps
ng new amplify-app
with CSS and no SSRcd amplify-app
amplify init
amplify add hosting
with manual deploymentamplify publish
Code Snippet
Log output
aws-exports.js
Manual configuration
amplifyconfiguration.json:
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response