I got an email from Vercel about a project that still uses Node 18, which is going to be sunset soon, saying that I should upgrade to Node 22. So I did, by changing the setting in the Vercel UI. The next deployment with this new setting failed with this message:
Error: The following Serverless Functions contain an invalid “runtime”
The message linked to this page, but that hasn’t been updated since Jan 2024 and doesn’t refer to Node 22 at all.
The project just has two Node.js serverless functions under the api/
folder, without a framework (no Next.js). Is it a known issue that these simply don’t work with Node 22? I couldn’t find anything in the documentation about that.
(I then changed my project setting to Node 20 and deploying with that worked fine.)