---
title: Serverless Function contains invalid runtime error
description: A guide for the "Serverless Function contains invalid runtime" error for Node.js v20 deployments.
url: /kb/guide/serverless-function-contains-invalid-runtime-error
canonical_url: "https://vercel.com/kb/guide/serverless-function-contains-invalid-runtime-error"
published: 2025-11-03
last_updated: 2025-11-10
authors: Ethan Arrowood
related:
  - /docs/functions/serverless-functions/runtimes/node-js
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---
<!-- docsgraph:related -->
## Related pages

> **For AI agents:** Follow these links to understand how this page connects to the rest of the Vercel ecosystem. For the full cross-link map (inbound, outbound, prerequisites, and semantic neighbors), see the .graph.md link below.

- [Supported Node.js versions](https://vercel.com/docs/functions/runtimes/node-js/node-js-versions?from=related) — Learn about the supported Node.js versions on Vercel.
- [Advanced Node.js Usage](https://vercel.com/docs/functions/runtimes/node-js/advanced-node-configuration?from=related) — Learn about advanced configurations for Vercel functions on Vercel.
- [Node.js](https://vercel.com/docs/functions/runtimes/node-js?from=related) — Learn how to use the Node.js runtime to create functions and deploy Node.js servers on Vercel.
- [Rust](https://vercel.com/docs/functions/runtimes/rust?from=related) — Build fast, memory-safe serverless functions with Rust on Vercel.
- [Runtime](https://vercel.com/docs/functions/configuring-functions/runtime?from=related) — Learn how to configure the runtime for Vercel Functions.
- [Why does npm run start not work on Vercel?](https://vercel.com/kb/guide/npm-run-start-not-working?from=related) — Information on why commands that start servers may not work with Vercel.
- [Why does my Serverless Function work locally but not when deployed?](https://vercel.com/kb/guide/why-does-my-serverless-function-work-locally-but-not-when-deployed?from=related) — Learn how to troubleshoot your Serverless Functions.
- [How do I debug a 502 error from a Vercel Serverless Function?](https://vercel.com/kb/guide/how-to-debug-a-502-error?from=related) — Information on how to debug a 502 error from a Vercel Serverless Function.
- [How can I make my library compatible with the Vercel Edge Runtime?](https://vercel.com/kb/guide/library-sdk-compatible-with-vercel-edge-runtime-and-functions?from=related) — Learn how to make your library or SDK compatible with the Edge Runtime for existing Edge Runtime code and Routing Middle
- [Troubleshooting Build Error: "Serverless Function has exceeded the unzipped maximum size of 250 MB"](https://vercel.com/kb/guide/troubleshooting-function-250mb-limit?from=related) — Learn how to troubleshoot builds failing due to exceeding the maximum function size limit on Vercel.

Full cross-link map for this page: [/kb/guide/serverless-function-contains-invalid-runtime-error.graph.md](/kb/guide/serverless-function-contains-invalid-runtime-error.graph.md)
<!-- /docsgraph:related -->


### Why am I seeing this error?

Vercel recently enabled support for Node.js v20. Our builder is based on [Amazon Linux 2023](https://aws.amazon.com/blogs/compute/introducing-the-amazon-linux-2023-runtime-for-aws-lambda/) (AL2023), which contains a new version of `glibc`, a dependency of any native executable. This version of `glibc` is different from the version on AWS Lambda and therefore projects built on AL2023 will now be incompatible when executed on AWS Lambda that do not use AL2023.

Vercel will fail your project build before it gets deployed instead of letting your project fail at runtime

### How do I fix this error?

While we continue to work on a solution, you should ensure your project [remains on Node.js v18](https://vercel.com/docs/functions/serverless-functions/runtimes/node-js#node.js-version) (which uses a compatible build image). Node.js v18 will not be deprecated until at least 2025, and we are actively pursuing solutions to support your project on the latest Node.js version.