Vercel not syncing latest GitHub commit / Environment Variable

Vercel not syncing latest GitHub commit / Environment Variable
issue

Dear Vercel Community or Support Team,

I am experiencing a persistent build failure for my Next.js application (turnos-app) deployed on Vercel,
and I need your assistance to diagnose the root cause.

Problem Description:
My builds consistently fail with the error P1001: Can’t reach database server at
aws-0-sa-east-1.pooler.supabase.com:6543.

Current Setup:

  • Database: Supabase (PostgreSQL)
  • ORM: Prisma
  • Vercel Project: turnos-app (linked to jonathangrenader/turnos-app on GitHub)
  • DATABASE_URL Environment Variable in Vercel: It is set to the direct connection URL from Supabase,
    including ?sslmode=require (e.g.,
    postgresql://postgres:[MY-PASSWORD]@db.spwahjdzycchzbrihqhz.supabase.co:5432/postgres?sslmode=require).
    I have confirmed this value multiple times and have tried deleting and re-creating the variable.
  • package.json postinstall script: “prisma generate && prisma migrate deploy” (it relies on the
    DATABASE_URL environment variable).

Troubleshooting Steps Already Taken:

  1. Confirmed Supabase database has no IP restrictions.
  2. Ensured DATABASE_URL in Vercel uses the direct connection string with ?sslmode=require.
  3. Removed and re-added the DATABASE_URL environment variable in Vercel to clear potential cache issues.
  4. Disconnected and reconnected the GitHub repository from Vercel to force a full resynchronization.
  5. Verified package.json syntax multiple times.

Key Observation from Build Logs:
Despite all troubleshooting, the Vercel build logs consistently show that the cloning process is pulling
an older commit from my GitHub repository (e.g., 08f6d6a) instead of the latest one (e.g., d00e408 or
cbb20e6). This older commit does not reflect the latest package.json changes or environment variable
configurations.

The build log still reports the connection attempt to the Supabase pooler URL
(aws-0-sa-east-1.pooler.supabase.com:6543), indicating that the correct DATABASE_URL from Vercel’s
environment variables is not being used by the build process.

It appears there might be a persistent caching or synchronization issue on Vercel’s side preventing the
build process from accessing the latest code and environment variable values.

Could you please investigate why my Vercel project is not syncing the latest commit from GitHub and why
the DATABASE_URL environment variable is not being correctly applied during the build process?

Thank you for your time and assistance.

Sincerely,

Jonathan
id: jonathangrenader

08f6d6a is the latest commit, later than the other two you mentioned, so it seems correct that Vercel is using this one

In your build script you’ve prepended it with DATABASE_URL=$DATABASE_URL which should never be necessary: in order for that to resolve to anything, the environment variable must already be in scope, and therefore at best it can only set an environment variable to itself (a no-op).

At worst, depending on the shell environment this may not be the correct way to reference a variable, and then this could actually clear it or overwrite it. I’m not 100% sure if that’s the issue here but it’s worth removing to test