This is seems to be the same as https://community.vercel.com/t/local-python-runtime-vercel-dev/3255
I have a project with FastAPI python backend, forked from https://vercel.com/templates/next.js/nextjs-fastapi-starter
Everything works fine except "vercel dev".
With a default versel.json :
"functions": { "api/**": { "excludeFiles": "{.next,.git,node_modules}/**" } },It just doesn't run python functions at all. All logs look successfull, but then there is just backend available.
vercel devVercel CLI 42.3.0> Running Dev Command “next dev --port $PORT”- ready started server on 0.0.0.0:3000, url: http://localhost:3000> Ready! Available at http://localhost:3000- info Loaded env from /Users/sinavski/projects/hello_world_website/.env.local- info Loaded env from /Users/sinavski/projects/hello_world_website/.env- event compiled client and server successfully in 2.6s (313 modules)- wait compiling...- event compiled client and server successfully in 1142 ms (313 modules)The client can't hit any of APIs:
Failed to load resource: the server responded with a status of 404 (Not Found)I tried adding python runtime into functions:
"functions": { "api/index.py": { "runtime": "vercel-python@3.12.0" }, "api/**": { "excludeFiles": "{.next,.git,node_modules}/**" } },I tried:
python,vercel/python,vercel-python- all sorts of errors with non-found npm python package- no minor version ->
Error: Function Runtimes must have a valid version, for examplenow-php@1.0.0.