Incorrect `vercel.json` configuration causes my project to fail

My project keeps failing when deploying.

My vercel json file is making it fail. What do I do?

Code

{
  "version": 2,
  "builds": [
    {
      "src": "api/server.py",
      "use": "@vercel/python"
    }
  ],
  "functions": {
    "api/server.py": {
      "maxDuration": 60
    }
  },
  "routes": [
    {
      "src": "/(.*)",
      "dest": "api/server.py"
    }
  ]
}

Hi, @coltenthefirst! Welcome to the Vercel Community :smile:

I made the following changes to your vercel.json file:

  1. Removed the functions property, as it’s not a standard configuration option in vercel.json .
  2. Kept the builds and routes configurations as they were, which should be correct for your Python server setup.
{
  "version": 2,
  "builds": [
    {
      "src": "api/server.py",
      "use": "@vercel/python"
    }
  ],
  "routes": [
    {
      "src": "/(.*)",
      "dest": "api/server.py"
    }
  ]
}

Could you give this a go?

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