Failure: "Function Runtimes must have a valid version"

Persistent Build Failure: “Function Runtimes must have a valid version” despite all troubleshooting, including on a minimal “Hello World” test.

Hello,

I am experiencing a persistent and critical build failure and have now exhausted all possible troubleshooting steps. I believe this is a platform-level issue.

Project: onlineafspraken-proxy (of de naam van uw laatste project) Git Repo: https://github.com/Masira888/onlineafspraken-proxy

Problem: Every build consistently fails with the error: Error: Function Runtimes must have a valid version, for example 'now-php@1.0.0'.

This error occurs even though my repository contains a valid vercel.json file in the root directory specifying the Node.js runtime.

Exhaustive Troubleshooting Steps Taken: To isolate the issue, we have performed the following steps without success:

  1. Verified vercel.json: We have confirmed multiple times that a valid vercel.json file exists in the root of the main branch. We have tried multiple valid configurations for the runtime, including node@18.x and node@20.x, as well as configurations found in the Vercel community. The error is the same every time.
  2. Verified Build Commit: We confirmed through the Vercel dashboard and commit hashes that Vercel is always building the correct, latest commit from the main branch.
  3. Re-created Project: We completely deleted the original Vercel project and created a brand new, clean project from scratch, linking it to the same repository and re-entering all environment variables. The error persisted on the new project immediately.
  4. Ultimate “Hello World” Test: As a final diagnostic step, we stripped the repository down to an absolute minimal “Hello World” serverless function (a single api/test.js file), a minimal package.json, and the simplest possible vercel.json ({ "functions": { "api/**/*.js": { "runtime": "node@20.x" } } }). The build of this absolute basic test case still fails with the exact same “Function Runtimes” error.

Conclusion: Since even minimal “Hello World” test fails on a brand new, clean project, it must mean that it proves the issue is not with my code or its configuration, but maybe an issue within the Vercel build environment related to my account or this specific repository.

Could you please investigate why the vercel.json file in my repository is being ignored by the build system, even under這些’s most basic test conditions?

Thank you for your time and help.

Thanks for sharing the repo and project name! I was able to deploy from that repo without any build errors, so I checked the logs for your project for more info. I see the error message No Output Directory named " ." found after the Build completed. You can configure the Output Directory in your Project Settings.

I used the default settings that were automatically selected when I deployed the code. Did you override the Output Directory setting with a different value? If so, please try again without the override and let me know if that fixes the error

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.