-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Amplify Next JS Build and Deployment "Successful" but not visible at the domain I have linked #3838
Comments
If the "solution" is just me switching hosting to Vercel, please just say the word. |
It looks like you manage to find the root cause as I see your App loading properly |
I wish, but unfortunately no. I have a react app folder and a Next.js folder. I have fallen back on the working React App and deployed that since the Next.js project is not working when "successfully deployed". |
Hi @PatOfCle, sorry to hear that you are running into issues when deploying your Next.js based app on Amplify Hosting. Current scenario: Findings:
Next steps:
Please let us know if this helps resolve your issue. Thanks! |
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
Leaving comment to keep issue open: will address this shortly. @Jay2113 Thank you for the response; I'll be taking those steps and getting back to everyone soon! |
Same problem with deployments. A mono-repo, api and website in own folders. Basic next.js, SSR build
In the logs it's uploading something... somewhere...
next.config.js
And then website is 404 And when I connected branch to Vercel, it built it and deployed from the first attempt 🤷 |
Having sort of the same issue, app runs perfectly locally using dev and using build, but after deploying to amplify it shows the not found page on every route. the header and footer do show up, but every route renders the not found component for some reason. All deployment stages on amplify are running fine, and the cloudwatch logs don't show any errors as well. The app platform is set as web_compute as well. @PatOfCle please let me know if you found a solution to your problem |
I've ended up swapping appRoot with front-end
If anybody from Amplify team on this thread, the problem here is lack of insight into produced artifacts. Vercel for example has special page to examine the artifact. Maybe there is a way to print this information using some kind of post build phase, idk. |
I ran into the same issue with my Angular app after being forced to migrate to the Amazon Linux:2023 image because we need to use node 18.8.2 now (see this comment). So far, no resolution for me. |
@OperationalFallacy 👋 , we have updated our documentation with the following troubleshooting guide: https://docs.aws.amazon.com/amplify/latest/userguide/troubleshooting-ssr-deployment.html#build-output-too-large. This guide should enable you to:
Additionally, to improve build performance and to persist the cache between builds Amplify Hosting now adds the following cache paths by default to your
@talalanjum @hanna-becker If you are observing errors such as content not loading or routes not rendering for your Next.js based SSR apps, I'll recommend taking a look at the hosting compute runtime logs as stated here. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
This issue has been automatically locked. |
Before opening, please confirm:
App Id
d27w7g8napxr00
AWS Region
us-east-2
Amplify Hosting feature
Custom build image, Custom domain, Deployments, Frontend builds, SSR
Frontend framework
Next.js
Next.js version
13/14
Next.js router
App Router
Describe the bug
I have a Next.js app that, when deploying via Amplify, says that all three stages "succeed", but when I click on the link to the page, the content is not visible. I can run the app perfectly locally, however.
I have scoured every corner of the internet, and tried every possible build image, node, and next version combination. Still zero clue what is wrong, as Amplify is telling me the build is successful. Maybe kind of symbolic link issue? Incredibly frustrated at this point; this doesn't seem to be a priority for the Amplify team, despite the immense number of clients moving onto Next.js.
Expected behavior
I expected the content to be visible at the linked url. The app was previously a React app. After a complete and successful migration to Next.js that I can run locally in version 13 and 14 without any issues, I expected to see the app running after Amplify tells me that the build and deployment phases succeeded.
Reproduction steps
npm install
thennpm run build
(ignore everything else in build file. npm install and npm run build alone produce a "successful" build and deployment.Build Settings
Log output
Additional information
I've consulted every AWS Amplify Next JS (version 13 and 14) resource on the internet and under the sun, to no avail. We are now at Build #58.
If Amplify simply can't or won't be solving this or the necessary Next.js incompatiabilities in the near future, please just tell me and I will take my business to Vercel.
Thank you for your time and help!
The text was updated successfully, but these errors were encountered: