PrismaP
Prisma17mo ago
7 replies
Priyank T Rajai

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.
Was this page helpful?