Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment variable not found: POSTGRES_PRISMA_UR #50

Open
masapasa opened this issue May 3, 2023 · 1 comment
Open

Environment variable not found: POSTGRES_PRISMA_UR #50

masapasa opened this issue May 3, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@masapasa
Copy link

masapasa commented May 3, 2023

npx prisma db push
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database

Error: Prisma schema validation - (get-config wasm)
Error code: P1012
error: Environment variable not found: POSTGRES_PRISMA_URL.
--> schema.prisma:11
|
10 | provider = "postgresql"
11 | url = env("POSTGRES_PRISMA_URL") // uses connection pooling
|

Validation Error Count: 1
[Context: getConfig].
I used npx vercel env pull .env to pull and also set export POSTGRES_URL_NON_POOLING=
Can you please suggest @steven-tey ?

@maige-app maige-app bot added the bug Something isn't working label May 3, 2023
@r-ohan
Copy link

r-ohan commented May 25, 2023

Definitely an issue with how this is configured. Prisma doesn't use the local environment variables without some hacking.

Just create a .env file and symlink it to your .env.local file. Like so:

ln -s .env.local .env

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants