Segment Functions Node.js v22 Upgrade
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, 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.
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.
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.
Recommendation
Segment recommends upgrading to Node.js v22, even if you don't plan to make any other changes to your functions.
Follow the instructions to upgrade, test, and deploy your code on Node.js v22 before the January 31, 2026 deadline.
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.
If you've built your function with the latest functions Editor, update your Node.js runtime as follows:
- Go to Catalog > Functions tab of the existing function that you wish to update.
- 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:
If you want to update your source function, use the Create Function Deployment endpoint.
If you have any other function type apart from source function, use the Update Function endpoint.