Skip to contentSkip to navigationSkip to topbar
On this page
Looking for more inspiration?Visit the
(information)
You're in the right place! Segment documentation is now part of Twilio Docs. The content you are used to is still here—just in a new home with a refreshed look.

Segment Functions Node.js v22 Upgrade


(information)

Node.js v22 upgrade

Segment will upgrade the functions Node.js runtime from Node.js v18 to Node.js v22 on January 31, 2026.

Segment keeps runtimes up to date with industry standards. Based on the Node.js support schedule(link takes you to an external page), Node.js v18 is no longer in Maintenance long-term support (LTS). Production applications should only use releases of Node.js that are Active LTS or Maintenance LTS.


What do I need to do?

what-do-i-need-to-do page anchor

Re-deploy and test your functions on the Node.js v22 runtime before January 31, 2026. You must deploy your functions to run them on Node.js v22.

After January 31, 2026, any changes you make to your functions must be deployed on Node.js v22.


What happens if I take no action?

what-happens-if-i-take-no-action page anchor

Your currently deployed functions will continue to execute on the existing Node.js v18 runtime if no changes are made.

  • After January 31, 2026, if you create or deploy a new function that has not yet been deployed, it will use Node.js v22 by default.
  • If you have an existing build of a function deployed, it will continue to use Node.js v18. After January 31, 2026, new deployments must be made on Node.js v22. You won't be able to create any new deployments using Node.js v18.
(information)

Recommendation

Segment recommends upgrading to Node.js v22, even if you don't plan to make any other changes to your functions.


How do I upgrade to Node.js v22?

how-do-i-upgrade-to-nodejs-v22 page anchor

Follow the instructions to upgrade, test, and deploy your code on Node.js v22 before the January 31, 2026 deadline.

(warning)

Test your functions before deploying

The upgrade from Node.js v18 to v22 doesn't require syntax changes, but your function's npm dependencies might be affected. It is important to check that the dependencies you include are supported on Node.js v22.

Using the Functions Editor UI

using-the-functions-editor-ui page anchor

If you've built your function with the latest functions Editor, update your Node.js runtime as follows:

  1. Go to Catalog > Functions tab of the existing function that you wish to update.
  2. Click Save & Deploy to build and deploy your function.

Once complete, all function instances will be running on Node.js v22.

If you're using the Public API to build and deploy your functions, you can update your Node.js runtime using the relevant endpoint based on your function type:

Source function type

source-function-type page anchor

If you want to update your source function, use the Create Function Deployment(link takes you to an external page) endpoint.

All other function types

all-other-function-types page anchor

If you have any other function type apart from source function, use the Update Function(link takes you to an external page) endpoint.