Priyank T Rajai
PPrisma
•Created by Priyank T Rajai on 10/3/2024 in #help-and-questions
Help Needed: Error with Postgres Schema, OpenAI Embedding and Prisma
2 replies
PPrisma
•Created by Priyank T Rajai on 9/5/2024 in #help-and-questions
Turborepo with Prisma throwing Error
We are encountering an issue with our Next.js application using a Turborepo setup, integrated with Prisma ORM and Neon Postgres as the database. Upon invoking prisma.job.findFirst(), the following error is thrown:
⨯ PrismaClientKnownRequestError:
Invalid
prisma.job.findFirst()
invocation:
Error validating datasource db
: the URL must start with the protocol prisma://
at Ln.handleRequestError (/var/task/node_modules/@prisma/client/runtime/library.js:121:7753)
...
code: 'P6001',
clientVersion: '5.19.1',
meta: { modelName: 'Job' }
The error stems from Prisma's validation of the datasource URL, indicating that the connection URL should start with the prisma:// protocol. However, Prisma typically expects a URL format like postgresql:// or mysql:// depending on the database used, making this error unexpected.8 replies