Assistance Required: Vercel 404 Error While Deploying Django Application
I am trying to deploy a Django application on Vercel, but I keep encountering a 404: NOT_FOUND error. Below is a summary of my setup and the configuration I have used:
vercel.json Configuration
{
"version": 2,
"builds": [
{
"src": "build_files.sh",
"use": "@vercel/static-build",
"config": {
"distDir": "staticfiles_build"
}
},
{
"src": "notes/wsgi.py",
"use": "@vercel/python",
"config": { "maxLambdaSize": "15mb", "runtime": "python3.9" }
}
],
"routes": [
{
"src": "/(.*)",
"dest": "notes/wsgi.py"
},
{
"src": "/static/(.*)",
"dest": "/static/$1"
}
]
}
What I Have Tried Verified that wsgi.py is properly configured and callable. Confirmed that static files have been collected and are stored in the staticfiles_build directory. Checked the routes and rewrites section of the vercel.json file to ensure proper mapping. Problem Description After deployment, I receive the 404: NOT_FOUND error when accessing the app. However, the build process completes successfully, and the deployment URL is generated.
The Django application works perfectly on my local machine, but it seems something is missing in my deployment configuration for Vercel.
Question What changes or additions do I need to make in my vercel.json file or deployment process to resolve this issue?
Any guidance or suggestions would be greatly appreciated!
Github link: https://github.com/Arnav613Gupta/Notes-Api.git vercel url : https://notes-api-snb5-pearl.vercel.app/