Skip to content

How to identify Nodejs version being use for Amplify app using Next.js - SSR Framework

0

Recently we receive mail from AWS for

Starting September 15, 2025, AWS Amplify Console will end support for Node.js 14, Node.js 16 and Node.js 18. After this date, you will not be able to deploy updates to your application until you upgrade your Node version. Please update all applications that use Node.js 14, Node.js 16 and Node.js 18 to Node.js 20+ before September 15, 2025.

I have deployed Nextjs: 14 version to aws amplify with using Next.js - SSR Framework

Now am trying to identify which nodejs version is being used for building process and which nodejs version is being used for Nextjs SSR part, though am not able to identify these info in Amplify console, I have checked for build logs, hosting compute logs though which nodejs version is being used is not specified,

I would like to know which nodejs version AWS amplify is being using for building the application and Nextjs SSR, which will help to check for notification from AWS for AWS Amplify Console will end support for Node.js 14, Node.js 16 and Node.js 18

asked a year ago885 views

2 Answers
6
Accepted Answer

Take this:

  1. Check the Build Environment

Add this to your amplify.yml file under the build phase:

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

This will print the Node.js version used during the build in your Amplify Console logs.

  1. Set a Specific Node.js Version
preBuild:
  commands:
    - nvm install 20
    - nvm use 20
    - node -v

You can also specify the Node version in your package.json:

"engines": {
  "node": ">=20.0.0"
}

This helps Amplify detect your preferred runtime and may trigger warnings if incompatible.

EXPERT

answered a year ago

0

To identify the Node.js version being used for your Amplify app with Next.js SSR, you have a few options:

For the build process:

  1. You can specify the Node.js version in your amplify.yml configuration file using the nodeVersion setting. For example:
settings:
nodeVersion: "18"
  1. If you haven't explicitly set a Node.js version, you can check your build logs for any indication of which version is being used during the build process.

For the SSR runtime:

  1. For Next.js SSR applications on Amplify, you can specify the Node.js version in your amplify.yml file, which will be used for both build and runtime environments.

  2. You can also add a simple API route to your Next.js application that returns process.version to display the Node.js version being used at runtime.

To update your Node.js version:

  1. Update the nodeVersion setting in your amplify.yml file to a supported version (Node.js 20+).
  2. Alternatively, you can use the engines field in your package.json file to specify the Node.js version requirements for your application.

Given AWS's announcement about ending support for Node.js 14, 16, and 18 after September 15, 2025, it's recommended to upgrade to Node.js 20+ before that date to ensure your application continues to work properly and receives security updates.
Sources
Announcing the end of support for Node.js 14.x and 16.x in AWS CDK | AWS DevOps & Developer Productivity Blog
my amplify deploy app problem | AWS re:Post
Configuring your application's dependencies on Elastic Beanstalk - AWS Elastic Beanstalk
IAM Compute Roles for Server-Side Rendering with AWS Amplify Hosting | Front-End Web & Mobile

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.