[▲ Vercel Community](/) · [Categories](/categories) · [Latest](/latest) · [Top](/top) · [Live](/live)

[Feedback](/c/feedback/8)

# Supabase integration env variables are not correct using prisma

131 views · 1 like · 4 posts


Magondevs (@magondevs) · 2025-01-07

Hello!

I found out that env variables are not correctly generated for supabase integration while using prisma.

I am able to use the Supabase Integration with my local POSTGRES_PRISMA_URL variable. But as I cannot edit the variables for the integration, it does not work when deployed.

The variable that works at my local ends in /postgres?pgbouncer=true

Your auto generated variable ends in /postgres?sslmode=require&supa=base-pooler.x and does not work either production or locally.

The rest of variable is the same and its correct.

Thank you very much.


Amy Egan (@amyegan) · 2025-01-07

Hey @magondevs. It looks like you have a different issue than [the original topic](https://community.vercel.com/t/cant-change-env-vars-that-come-from-the-supabase-integration/2796) so I moved your post to its own new thread. 

Do you have a public repo or [minimal reproducible example](https://vercel.com/guides/creating-a-minimal-reproducible-example) that you can share here? Or just walk me through the steps you followed to set up the Supabase integration and Prisma. That will give me a better understanding of the issue so I can help you find a solution :smile:


Magondevs (@magondevs) · 2025-01-08 · ♥ 1

Hello, thanks for the quick response.

Basically I followed this steps:

1. Created the start project by cloning [https://vercel.com/templates/next.js/postgres-prisma](https://vercel.com/templates/next.js/postgres-prisma)
2. After some time developing, decided to create a test environment database using supabase. But I followed the supabase recomendation to connect my local instead of using the autogenerated vercel environment variables:
![Screenshot 2025-01-08 at 09.19.57|690x177](upload://kdwvwwGARDBWjc85NGWjCtvaSlE.png)
3. The DB was working fine but at vercel preview deployment prisma was not able to connect.
4. I checked the autogenerated POSTGRES_PRISMA_URL and it's different from the one that Supabase recommends, and definitely not working. /postgres?sslmode=require&supa=base-pooler.x vs /postgres?pgbouncer=true
5. Can't edit any variable because they are autogenerated, I could use another name but POSTGRES_PRISMA_URL seems a nice convention.
![Screenshot 2025-01-08 at 09.14.00|690x179](upload://x4rk4mH1inZZeVj7mYJQ50VUsBb.png)
![Screenshot 2025-01-08 at 09.13.20|690x281](upload://8IkZUfsje6Tzd95z2ns7MqZYDYe.png)

Also mention that the button that should allow me to manage connection (at the popover for the environment variable) just opens a black screen.

Thank you very much, let me know if you need extra information from my side.


thuynh (@thuynh) · 2025-03-07

This is frustrating.  Has there been an update to this?  I am thinking of not using the Vercel integration with Supabase and adding the environment variables myself since we're not able to edit the connection string manually.

In the [Supabase troubleshooting docs,](https://supabase.com/docs/guides/database/prisma/prisma-troubleshooting#solution-prepared-statement-exists) adding `?pgbouncer=true` should make `... prepared statement already exists` go away