The issue is fixed now. I think it has something to do with github branch names. When I changed the branch name from main to staging, it broke. Started working when I renamed it to main. This is unexpected because I had changed branch names in both the github repo as well as vercel settings