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

Build fails on amplify for node #3818

Closed
4 tasks done
pankajsoni19 opened this issue Nov 18, 2023 · 4 comments
Closed
4 tasks done

Build fails on amplify for node #3818

pankajsoni19 opened this issue Nov 18, 2023 · 4 comments
Labels
archived This issue has been locked. transferred This issue was transferred from another Amplify project

Comments

@pankajsoni19
Copy link

Before opening, please confirm:

App Id

dnjuytvw4f7zx

Region

ap-southeast-1

Environment name

production

Figma File Version (if applicable)

No response

Amplify CLI Version

No response

If applicable, what version of Node.js are you using?

No response

What operating system are you using?

No response

Browser type?

No response

Describe the bug

Next Js build is failing with no changes done in code. Seems to be amplify internal error

build settings are >
amplify.yml

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

build image default,
nodeJS override > 16

error log

https://ap-southeast-1.console.aws.amazon.com/amplify/home?region=ap-southeast-1#/dnjuytvw4f7zx/master/29

2023-11-18T15:11:07.567Z [ERROR]: InvalidParameterValueException: The runtime parameter of nodejs12.x is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (nodejs18.x) while creating or updating functions.
                                  at Object.extractError (/root/./-patch.2/node_modules/aws-sdk/lib/protocol/json.js:80:27)
                                  at Request.extractError (/root/./-patch.2/node_modules/aws-sdk/lib/protocol/rest_json.js:61:8)
                                  at Request.callListeners (/root/./-patch.2/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
                                  at Request.emit (/root/./-patch.2/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
                                  at Request.emit (/root/./-patch.2/node_modules/aws-sdk/lib/request.js:686:14)
                                  at Request.transition (/root/./-patch.2/node_modules/aws-sdk/lib/request.js:22:10)
                                  at AcceptorStateMachine.runTo (/root/./-patch.2/node_modules/aws-sdk/lib/state_machine.js:14:12)
                                  at /root/./-patch.2/node_modules/aws-sdk/lib/state_machine.js:26:10
                                  at Request.<anonymous> (/root/./-patch.2/node_modules/aws-sdk/lib/request.js:38:9)
                                  at Request.<anonymous> (/root/./-patch.2/node_modules/aws-sdk/lib/request.js:688:12) {
                                  code: 'InvalidParameterValueException',
                                  '[Type]': 'See error.Type for details.',
                                  time: 2023-11-18T15:11:07.300Z,
                                  requestId: '349983a8-0381-4793-a278-72350d1428d4',
                                  statusCode: 400,
                                  retryable: false,
                                  retryDelay: 79.52183539506083
                                  }
2023-11-18T15:11:07.569Z [ERROR]: �[G�[?25h�[G�[J
                                  147s › dnjuytvw4f7zx › InvalidParameterValueException: The runtime parameter of nodejs12.x is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (nodejs18.x) while creating or updating functions.
                                  �[G�[?25h
Terminating logging...

Expected behavior

Build should compile as before about 4 months ago.

Reproduction steps

  1. Git push
  2. triggers build
  3. next js build succeeds
  4. fails on ssr signalling some dependency on AWS Lambda. there is no lambda in our code, so something internal is breaking

Project Identifier

No response

Additional information

No response

@ykethan
Copy link
Member

ykethan commented Nov 20, 2023

Hey @pankajsoni19, 👋 thanks for raising this! I'm going to transfer this over to our hosting repository for better assistance 🙂

@ykethan ykethan transferred this issue from aws-amplify/amplify-studio Nov 20, 2023
@ykethan ykethan added the transferred This issue was transferred from another Amplify project label Nov 20, 2023
@Jay2113
Copy link
Contributor

Jay2113 commented Feb 7, 2024

Hi @pankajsoni19 👋 , thanks for reaching out. I observed that your Amplify app dnjuytvw4f7zx has been deleted. Based on the logs that you shared it seems that your app was using Amplify's Classic SSR platform (Next.js 11 only). To give you some context, with Amplify's Classic SSR platform some app resources such as Lambda@Edge functions, CloudFront distributions, etc. are deployed in your AWS account. This particular error seems to have occurred since the Lambda@Edge functions for your app were using the Node 12 runtime which has been deprecated: https://docs.aws.amazon.com/id_id/lambda/latest/dg/lambda-runtimes.html#runtime-support-policy.

Today, if you create an Amplify app using our Classic SSR platform the Lambda@Edge functions for your app will use the Node 16 runtime and you should no longer see this error. That being said, we strongly recommend that you migrate your Next.js 11 apps to the Amplify Hosting compute managed SSR platform. For more information on how to migrate your classic app, refer to this documentation: https://docs.aws.amazon.com/amplify/latest/userguide/update-app-nextjs-version.html.

@Jay2113 Jay2113 closed this as completed Feb 7, 2024
Copy link

github-actions bot commented Feb 7, 2024

This issue is now closed. 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.

Copy link

github-actions bot commented Feb 7, 2024

This issue has been automatically locked.

@github-actions github-actions bot added the archived This issue has been locked. label Feb 7, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Feb 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived This issue has been locked. transferred This issue was transferred from another Amplify project
Projects
None yet
Development

No branches or pull requests

3 participants