Skip to content
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

500 error on new NextJS app after successful build and deploy #3479

Closed
5 tasks done
bflanagan2 opened this issue May 11, 2023 · 5 comments
Closed
5 tasks done

500 error on new NextJS app after successful build and deploy #3479

bflanagan2 opened this issue May 11, 2023 · 5 comments
Labels
archived This issue has been locked. closing-soon This issue will automatically close in 4 days unless further comments are made. compute question Further information is requested response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@bflanagan2
Copy link

Before opening, please confirm:

  • I have checked to see if my question is addressed in the FAQ.
  • I have searched for duplicate or closed issues.
  • I have read the guide for submitting bug reports.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I have removed any sensitive information from my code snippets and submission.

App Id

d1g7ti7hmwjxjd

AWS Region

us-east-1

Amplify Hosting feature

Deployments, Frontend builds

Describe the bug

I've added a new NextJS app to Amplify using my normal procedure in the UI using defaults as I've done for several other apps but for this one, after a successful build and deploy, the generated URL returns a 500 error. There seems to be two log entries that might be relevant: one is in the Clone step and the other in the Frontend step.

Expected behavior

Site renders as expected.

Reproduction steps

  1. Select "Host Web App" from the "New app" drop down.
  2. Connect github repo
  3. Assign branch (master)
  4. Accept build settings and click "Next"
  5. Click "Save and Deploy"
  6. Wait for build and deploy to complete.
  7. Click on hyperlink to assigned URL
  8. Received 500 error

Build Settings

version: 1
frontend:
  phases:
    preBuild:
      commands:
        - yarn install
    build:
      commands:
        - yarn run build
  artifacts:
    baseDirectory: .next
    files:
      - '**/*'
  cache:
    paths:
      - node_modules/**/*

Log output

# Put your logs below this line
#Clone 
2023-05-11T18:58:51.022Z [INFO]: # Retrieving environment cache...
2023-05-11T18:58:51.075Z [WARNING]: ! Unable to write cache: {"code":"ERR_BAD_REQUEST","message":"Request failed with status code 404"})}
2023-05-11T18:58:51.075Z [INFO]: ---- Setting Up SSM Secrets ----
2023-05-11T18:58:51.076Z [INFO]: SSM params {"Path":"/amplify/d1g7ti7hmwjxjd/master/","WithDecryption":true}
2023-05-11T18:58:51.110Z [WARNING]: !Failed to set up process.env.secrets

#Frontend 
2023-05-11T18:59:45.886Z [INFO]: info @next/[email protected]: The platform "linux" is incompatible with this module.
2023-05-11T18:59:45.889Z [INFO]: info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
                                 info @next/[email protected]: The CPU architecture "x64" is incompatible with this module.
                                 info @next/[email protected]: The platform "linux" is incompatible with this module.
                                 info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
                                 info @next/[email protected]: The CPU architecture "x64" is incompatible with this module.
                                 info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
                                 info @next/[email protected]: The CPU architecture "x64" is incompatible with this module.
                                 info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
                                 info @next/[email protected]: The platform "linux" is incompatible with this module.
                                 info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
                                 info @next/[email protected]: The CPU architecture "x64" is incompatible with this module.
                                 info @next/[email protected]: The platform "linux" is incompatible with this module.
                                 info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
                                 info @next/[email protected]: The CPU architecture "x64" is incompatible with this module.
                                 info @next/[email protected]: The platform "linux" is incompatible with this module.
                                 info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
                                 info [email protected]: The platform "linux" is incompatible with this module.
                                 info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.

Additional information

No response

@bflanagan2 bflanagan2 added bug Something isn't working pending-triage labels May 11, 2023
@bflanagan2
Copy link
Author

Update Looks like this was introduced with a recent NextJS minor version. I downgraded to [email protected] and the site builds as expected. (Not yet sure which version introduced the issue yet though)

@terodox
Copy link

terodox commented May 16, 2023

NextJS had a breaking change in 13.4.0 and 13.4.1 that was fixed in 13.4.2

Upgrading to 13.4.2 or higher should resolve this issue.

Original issue link: #3466

@ghost ghost added question Further information is requested response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. compute and removed bug Something isn't working pending-triage labels May 16, 2023
@github-actions
Copy link

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.

@github-actions github-actions bot added the closing-soon This issue will automatically close in 4 days unless further comments are made. label May 19, 2023
@ghost ghost closed this as completed May 19, 2023
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot added the archived This issue has been locked. label May 19, 2023
@github-actions github-actions bot locked and limited conversation to collaborators May 19, 2023
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived This issue has been locked. closing-soon This issue will automatically close in 4 days unless further comments are made. compute question Further information is requested response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

2 participants