Builds + Functions + Plugins: Default Node.js version upgrade to 22

The default system Node.js version will be updated from version v18 → v22 on January 27, 2025.

IMPORTANT UPDATE - This release been delayed to February 24, 2025

Why are we doing this?

Node.js v22 is the current LTS (Long Term Supported) version, and updating to use Node.js v22 by default allows customers to take advantage of the latest features as well as benefit from the performance and security improvements that the newer version delivers.

What are the impacts of this change?

  • The default Node.js version available on the build image will be v22
  • The default runtime for Node.js functions deployed after this change will be v22
  • Plugins installed through the Integrations tab will begin using v22.
  • Local plugins and plugins installed via a site’s package.json that use a Node.js version lower than v18 will default to using v22.

Note - Running the build command itself is unaffected by this change, and running it with Node.js versions below v22 continues to be supported.

What do you need to do?

Plugin authors: Almost all plugins are already compatible with Node.js v22 but you may want to confirm this for your plugin. If your plugin is not compatible, you will need to migrate your plugin to support Node.js v22 before February 24, 2025.

Plugin users: If you are using a plugin that no longer works after the upgrade to Node.js v22, please file an issue on the plugin’s repository so that the plugin author can make the necessary changes.

For more information see the following docs:

We want your feedback!

Your feedback is invaluable in shaping our tools and services. If you encounter any issues or have suggestions, we’d love to hear from you! Please post in this thread, and someone from our team will be sure to help you out.

1 Like

Wanted to make a note here in the case someone is having an issue using Rust with their Netlify functions.

I’ve currently been using Rust for my functions and pushing my functions with a manual Netlify deploy --prod. I zip them up myself using cargo lambda which is a great tool for cross compiling the functions especially when using crates like openssl and tls.

When doing this, you must make sure to set your AWS_LAMBDA_JS_RUNTIME="provided.al2023" which tells the functions to use an OS-only runtime.

I believe it would be a great idea for Netlify to natively use cargo-lambda (uses zig/zigbuild) for auto cross compile to target gnu rather than musl using the cargo compiler. This is the method AWS uses currently for their lambda functions.

Note: I’m successfully using Netlify functions fully written in Rust and making calls to Neon’s postgres database over a tls connection. These will not compile on the Netlify build at the moment, but a great solution and worth the manual build local.

IMPORTANT UPDATE
The date of this release has been delayed from January 27, 2025 to February 24, 2025 in order to give everyone a little more time to update their sites and to prepare for this change.