make default runenr use node >20
Had to add node version hint for runner in .nvmrc to be picked up and choose node 20 build image. otherwise error in console
WebBuilder
exit status 1: running "npx --yes @opennextjs/[email protected] build":
Monorepo detected at /root/repo
Next.js version : 16.1.1
OpenNext v3.6.6
┌─────────────────────────────────┐
│ OpenNext — Building Next.js app │
└─────────────────────────────────┘
> [email protected] build /root/repo/apps/web
> next build
You are using Node.js 18.20.8. For Next.js, Node.js version ">=20.9.0" is required.
ELIFECYCLE Command failed with exit code 1.
node:internal/errors:865
const err = new Error(message);
^
Error: Command failed: pnpm build
at __node_internal_genericNodeError (node:internal/errors:865:15)
at checkExecSyncError (node:child_process:890:11)
at Object.execSync (node:child_process:962:15)
at buildNextjsApp (file:///root/.npm/_npx/50886814b1fd9b6b/node_modules/@opennextjs/aws/dist/build/buildNextApp.js:15:8)
at build (file:///root/.npm/_npx/50886814b1fd9b6b/node_modules/@opennextjs/aws/dist/build.js:31:5)
at async file:///root/.npm/_npx/50886814b1fd9b6b/node_modules/@opennextjs/aws/dist/index.js:9:1 {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 738,
stdout: null,
stderr: null
}
Node.js v18.20.8
Did you actually get it to work? I tried package.json and add "engine" with node "24.2.0" as that seems to be supported in the builder image. And also with the .nvmrc containing "24.2.0" I still get the logs as:
(node:356) Warning: NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
no longer support Node.js v18.20.8 in January 2026.
To continue receiving updates to AWS services, bug fixes, and security
updates please upgrade to a supported Node.js LTS version.
More information can be found at: https://a.co/c895JFp
Heres the bit from the documentation https://sst.dev/docs/reference/config/#architecture
EDIT: and the supported latest node version for the builder image I got here: https://github.com/aws/aws-codebuild-docker-images/blob/520ced882354739f6fe8b2550cd7ec8c01ea42b6/al/x86_64/standard/5.0/Dockerfile#L345C22-L345C28
EDIT2: and for the record, the actual building IS getting the correct node version:
..so it kind of works but I wanted the AWS codedeploy to adhere this too as that what I was thinking when reading the documentation.
setting .nvmrc to 20.11.1 fixed the issue for me.