trying to deploy web2py on vercel, but no succeed, any hints ?
steps
npm i vercel
unzip -o web2py_src.zip
cd web2py
cat << EOF > requirements.txt
EOF
with web2py.py
cat << EOF > vercel.json
{
"version": 0,
"builds": [
{
"src": "*.py",
"use": "@vercel/python"
}
],
"routes": [
{
"src": "(.*)",
"dest": "web2py.py"
}
]
}
EOF
../node_modules/.bin/vercel dev
result
> Built @vercel/python:web2py.py [23s]
Missing variable `handler` or `app` in file "web2py.py".
TypeError: Object prototype may only be an Object or null: undefined
at Function.setPrototypeOf (<anonymous>)
at new LambdaError (/Users/sugizo/Downloads/learn/node_modules/vercel/dist/index.js:10913:16)
at Lambda.<anonymous> (/Users/sugizo/Downloads/learn/node_modules/vercel/dist/index.js:11033:27)
at Generator.next (<anonymous>)
at fulfilled (/Users/sugizo/Downloads/learn/node_modules/vercel/dist/index.js:10941:58)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
with anyserver.py
cat << EOF > vercel.json
{
"version": 0,
"builds": [
{
"src": "*.py",
"use": "@vercel/python"
}
],
"routes": [
{
"src": "(.*)",
"dest": "anyserver.py"
}
]
}
EOF
../node_modules/.bin/vercel dev
result
> Built @vercel/python:anyserver.py [11s]
Missing variable `handler` or `app` in file "anyserver.py".
TypeError: Object prototype may only be an Object or null: undefined
at Function.setPrototypeOf (<anonymous>)
at new LambdaError (/Users/sugizo/Downloads/learn/node_modules/vercel/dist/index.js:10913:16)
at Lambda.<anonymous> (/Users/sugizo/Downloads/learn/node_modules/vercel/dist/index.js:11033:27)
at Generator.next (<anonymous>)
at fulfilled (/Users/sugizo/Downloads/learn/node_modules/vercel/dist/index.js:10941:58)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
thanks and best regards,
stifan