Forge CLI does not support latest Node.js LTS version

When using any forge command (e.g. forge --version) in a node environment using the latest LTS version v22.11.0 we get the following warning message:

(node:67301) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Warning: Forge CLI supports Node.js 18.x or 20.x.
Unsupported Node.js versions are not guaranteed to work correctly.

I am using version 10.12.0 of the @forge/cli package installed using npm.

Is there a roadmap when forge CLI will start supporting Node.js 22?

We are currently using forge CLI commands inside docker containers that come with Playwright for e2e testing. The environment inside those docker containers was upgraded to Node.js 22 with @playwright/test v1.49.0. This appears to have broken our setup.

2 Likes

Hi Simon,

Forge currently doesn’t support Node 22. You can use Node 20 in the meantime.

Amazon only just released their support Node 22 for Lambdas on the 22nd Nov (Node.js 22 runtime now available in AWS Lambda | AWS Compute Blog).

Good news though, we will be releasing the Node 22 Runtime this side of Christmas if all goes to plan.

Cheers
Ben

2 Likes

Hi Benny,

Thanks for the info. We are looking forward to the update!

Just to make sure we are on the same page: I am not talking about the node runtime version specified in our app’s manifest.yml. Presumably that refers to the version used for executing forge backend calls inside AWS Lambdas.
Instead I am talking about the node version installed on my local machine when executing CLI commands like forge deploy.

I can see that it might make sense for you guys to update the supported node versions for both of these scenarios simultaneously though.

Best,
Simon

1 Like

Thanks for this feedback Simon.

I have passed this onto the relevant team to fix this issue.
Thanks for raising it to our attention.

1 Like

Any updates on this?
Looks like the @forge/cli package still only supports Node major versions 18 and 20.

Via @forge/cli - npm you can see that in the currently released version, the file /@forge/cli/out/command-line/version-info.js contains the following on line 23:
const supportedNodeMajorVersions = [18, 20];

3 Likes