Failed to deploy due to runtime version fail

{
    "version": 2,
    "functions": {
      "api/**/*.js": {
        "runtime": "nodejs@20.x"
      }
    },
    "routes": [
      {
        "src": "/(.*)",
        "dest": "/bin/www"
      }
    ]
  }

I got error

Error: Function Runtimes must have a valid version, for example `now-php@1.0.0`.

Hi, @dotku! Welcome to the Vercel Community.

Thanks for being patient with us :smile:

The error you’re encountering, “Function Runtimes must have a valid version, for example now-php@1.0.0,” indicates that the runtime version specified in your vercel.json file is not in the correct format.

Could you try this?

{
  "version": 2,
  "functions": {
    "api/**/*.js": {
      "runtime": "vercel/node@20.x"
    }
  },
  "routes": [
    {
      "src": "/(.*)",
      "dest": "/bin/www"
    }
  ]
}

Let us know how you get on!

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