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

Local Development issues #1

Open
klei30 opened this issue Jan 4, 2025 · 0 comments
Open

Local Development issues #1

klei30 opened this issue Jan 4, 2025 · 0 comments
Labels
documentation Improvements or additions to documentation question Further information is requested

Comments

@klei30
Copy link

klei30 commented Jan 4, 2025

HI, great project!
Really like to develop this locally but i am having some issues with set up and installation .
Can you provide a guide on the setup what kind of env variables should i use ?
Encountered a validation error when attempting to use the prisma.account.findUnique() method in a Next.js application integrated with Next-Auth and Prisma.
The error is related to the datasource URL configuration in schema.prisma, requiring the protocol to start with postgresql:// or postgres://.

error:

Invalid prisma.account.findUnique()` invocation:

error: Error validating datasource db: the URL must start with the protocol postgresql:// or postgres://.

To use a URL with protocol prisma://, you need to either enable Accelerate or the Data Proxy.
Enable Accelerate via prisma generate --accelerate or the Data Proxy via prisma generate --data-proxy.

More information about Data Proxy: https://pris.ly/d/data-proxy

--> schema.prisma:10
|
9 | provider = "postgresql"
10 | url = env("DATABASE_URL")
|

Validation Error Count: 1

`

.env

i am using prisma.io and have create a setup there

DATABASE_URL=prisma+postgres://accelerate.prisma-data.net/?api_key=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Thanks

@maige-app maige-app bot added documentation Improvements or additions to documentation question Further information is requested labels Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant