Closed EgbieAndersonUku1 closed 2 months ago
Refactor Project Structure and Configuration:
Moved directory to src and everything into src, so Vercel can find it Added build.sh file to streamline the build process and for Vercel to be able to build. Updated database configuration from SQLite to PostgreSQL for production readiness.
I am experiencing difficulties deploying my Django application to Vercel. Despite adhering closely to the Vercel documentation for Python serverless functions and Django configurations, I am encountering errors indicating that a required variable handler or app is missing. The deployment fails with the error message: "Missing variable handler or app in file src/manage.py.
Steps to Reproduce:
markdown structure
vercel-handler.py:
vercel.json:
manage.py:
Error Message:
Vercel Deployment Logs: Missing variable 'handler' or 'app' in file 'src/manage.py' INIT_REPORT Init Duration: 194.45 ms Phase: invoke Status: error Error Type: Runtime.ExitError
Expected Behaviour:
The Django application should be deployed and served correctly by Vercel, using vercel-handler.py as the entry point.
Actual Behaviour:
The deployment fails with an error indicating that the handler or app variable is missing, despite vercel-handler.py correctly exposing the app variable.
Additional Information: