Vercel Redeploy Not Using the Latest GitHub Commit

Hi Community,

I’m encountering an issue with my Vercel deployment, and I hope someone here can help me troubleshoot this.

Problem Description:

I’ve made updates to my GitHub repository (marketec/review-manager) and pushed the changes to the branch linked to my Vercel project. However, when I click Redeploy on Vercel, it seems to be pulling an older commit instead of using the latest changes from the repository. This results in a failed deployment with the following error:

lua

Copy code

Failed to compile.
./comparison/src_profile.ts:3:29
Type error: Cannot find module '../auth/[...nextauth]' or its corresponding type declarations.

What I’ve Tried So Far:

  1. Checked GitHub Repository Updates:
  • Verified that my repository is up-to-date with the correct changes by running:

bash

Copy code

git log --oneline
  • Confirmed that the latest commit is pushed to the main branch.
  1. Confirmed Vercel Git Settings:
  • Checked the connected repository in Vercel under Settings > Git. It is correctly linked to marketec/review-manager on GitHub.
  1. Cleared Build Cache:
  • Enabled Clear Build Cache in Settings > Build & Development Settings before triggering a redeploy.
  1. Manually Triggered Deployment:
  • Pushed an empty commit to force a redeploy:

bash

Copy code

git commit --allow-empty -m "Trigger redeploy"
git push
  1. Reverted/Reset Commits:
  • Tried reverting the problematic commit and resetting the branch to a known good state. Then, I pushed the changes:

bash

Copy code

git reset --hard <correct-commit-hash>
git push origin main --force

Main Issue:

Despite all these steps, the redeployment on Vercel still pulls an older commit instead of the latest commit from the linked branch. I suspect something is cached or misconfigured on Vercel’s side, but I’m not sure how to fix it.

The domain troubleshooting guide can help with most custom domain configuration issues. You might be able to use that guide to solve it before a human is available to help you. Then you can come back here and share the answer for bonus points.

You can also use v0 to narrow down the possibilities.