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

Next.JS deployment not working after build completed #3631

Closed
5 tasks done
questionableservices opened this issue Jul 31, 2023 · 15 comments
Closed
5 tasks done

Next.JS deployment not working after build completed #3631

questionableservices opened this issue Jul 31, 2023 · 15 comments
Assignees
Labels
archived This issue has been locked. bug Something isn't working compute

Comments

@questionableservices
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

d1nkrztuk7xgun

AWS Region

eu-central-1

Amplify Hosting feature

Frontend builds, SSR

Frontend framework

Next.js

Next.js version

13.1.6

Next.js router

Pages Router

Describe the bug

In the last few days, deployments simply do not work. The app I am trying to deploy is an initial version of one that was easily deploy two weeks ago. Now I just keep getting this error:

2023-07-31T18:52:16.797Z [INFO]: # Completed phase: build 2023-07-31T18:52:16.800Z [INFO]: ## Build completed successfully 2023-07-31T18:52:16.801Z [INFO]: # Starting caching... 2023-07-31T18:52:16.811Z [INFO]: # Creating cache artifact... 2023-07-31T18:52:25.048Z [INFO]: # Created cache artifact 2023-07-31T18:52:25.165Z [INFO]: # Uploading cache artifact... 2023-07-31T18:52:28.547Z [INFO]: # Uploaded cache artifact 2023-07-31T18:52:28.618Z [INFO]: # Caching completed 2023-07-31T18:52:28.620Z [INFO]: Setting NEXT_PRIVATE_STANDALONE=true to produce .next/standalone directory 2023-07-31T18:52:28.621Z [INFO]: # No custom headers found. 2023-07-31T18:52:29.494Z [ERROR]: !!! CustomerError: Required dependency file not found: /codebuild/output/src2725073759/src/webcv/amplify.sh

I've read in several places ( like this one ) that there has been a change.

Expected behavior

Build and deploy running smoothly like in the last few deploys done before the update on Amplify hosting

Reproduction steps

  1. Connect repo
  2. Start a deploy

Build Settings

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

Log output

# Put your logs below this line


Additional information

No response

@victorccccc
Copy link
Contributor

victorccccc commented Aug 1, 2023

Hi @questionableservices, thanks for reporting the issue. Unfortunately, we cannot reproduce this issue on our end. Could you please share the nextjs version for your app? and have you try to import all files under root directory in your application?

It would be great if you could provide the minimal repro repository for us, you can send it to [REDACTED]

Thanks!

@sudhishkr
Copy link

sudhishkr commented Aug 1, 2023

Hey @Jay2113 & @victorccccc ... I have recently hit the same exact issue on a project which was working fine.

Did anything change w.r.t environment? The error in itself is not clear and there are no logs.

2023-08-01T22:37:49.559Z [INFO]: # No custom headers found.
2023-08-01T22:37:50.835Z [ERROR]: !!! CustomerError: Required dependency file not found: /codebuild/output/src4136326795/src/<PROJECTNAME>/<FOLDERPATH>/amplify.sh

I am on "next": "^13.4.7",

@tsvint
Copy link

tsvint commented Aug 3, 2023

We are facing the exact same issue on a project that was working just fine. Without any single code changes it just won't deploy anymore .

Completed phase: build

2023-08-03T11:56:02.211Z [INFO]: ## Build completed successfully
2023-08-03T11:56:02.212Z [INFO]: # Starting caching...
2023-08-03T11:56:02.216Z [INFO]: # Creating cache artifact...
2023-08-03T11:56:12.787Z [INFO]: # Created cache artifact
2023-08-03T11:56:12.904Z [INFO]: # Uploading cache artifact...
2023-08-03T11:56:17.436Z [INFO]: # Uploaded cache artifact
2023-08-03T11:56:17.528Z [INFO]: # Caching completed
2023-08-03T11:56:17.532Z [INFO]: Setting NEXT_PRIVATE_STANDALONE=true to produce .next/standalone directory
2023-08-03T11:56:17.536Z [INFO]: # No custom headers found.
2023-08-03T11:56:21.536Z [ERROR]: !!! CustomerError: Required dependency file not found: /codebuild/output/src172904352/src/tsv-webapp/__cache.tar
2023-08-03T11:56:21.719Z [INFO]: # Starting environment caching...
2023-08-03T11:56:21.719Z [INFO]: # Environment caching completed
Terminating logging...

Is anybody able to identify the root cause of this? It has to do something with an update done to Amplify, I see no other reason why it wont deploy

@sudhishkr
Copy link

I am still hitting the same issue ... and I am hoping to get some help from AWS folks here. I guess this is seen on NextJS projects only.

I am not seeing this issue on Vercel or Netlify - and I am considering switching over. I would really like to keep this app on amplify.

@tsvint
Copy link

tsvint commented Aug 4, 2023

@questionableservices
Copy link
Author

questionableservices commented Aug 4, 2023

Hi @questionableservices, thanks for reporting the issue. Unfortunately, we cannot reproduce this issue on our end. Could you please share the nextjs version for your app? and have you try to import all files under root directory in your application?

It would be great if you could provide the minimal repro repository for us, you can send it to[REDACTED]

Thanks!

Hello,

Like I've mentioned, it is running version 13.1.6 of NextJs, of a default project that initially worked and then about 7 days ago failed to build successfully.

Should I provide access to the repository for you?

Also, I did not understand what you meant by: and have you try to import all files under root directory in your application?

@sudhishkr
Copy link

Is there a way to get aws support to notice this ticket? I unfortunately don't have a premium support account to flag this. Wondering if it is possible to get some help here?

@tsvint
Copy link

tsvint commented Aug 6, 2023

Please provide an update on this issue as our team is blocked from doing any deployments on Amplify.

@sudhishkr
Copy link

@Jay2113 - I am completely blocked here. It would be good to get some improved logging in your logs as well.

Do you have any estimates here?

@Jay2113
Copy link
Contributor

Jay2113 commented Aug 7, 2023

Hi everyone, thanks for your continued patience and just a quick note here that we are actively investigating into this and will keep you posted with any updates.

@victorccccc
Copy link
Contributor

victorccccc commented Aug 7, 2023

Hi @questionableservices 👋 , could you please add me to your repository if possible? It would be very helpful if we can reproduce the issue.

[UPDATE 1]: Thanks for your patience. We are working on a fix for this issue and will update here when the issue is resolved.

[UPDATE 2]: Issue has been resolved. Please build your application again.

@Jay2113 Jay2113 added bug Something isn't working and removed investigating labels Aug 7, 2023
@sudhishkr
Copy link

Hey @Jay2113 & @victorccccc - thanks for the fix. I can confirm - I am unblocked .. and I am able to move forward here.

@questionableservices
Copy link
Author

I can confirm the issue has been fixed. Thank you for your help @victorccccc @Jay2113

@github-actions
Copy link

github-actions bot commented Aug 8, 2023

⚠️COMMENT VISIBILITY WARNING⚠️

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.

@github-actions
Copy link

github-actions bot commented Aug 8, 2023

This issue has been automatically locked.

@github-actions github-actions bot added the archived This issue has been locked. label Aug 8, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Aug 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived This issue has been locked. bug Something isn't working compute
Projects
None yet
Development

No branches or pull requests

5 participants