P
Prisma•3mo ago
Antonin

cacheStrategy is never

error :
Type '{ ttl: number; swr: number; }' is not assignable to type 'never'.ts(2322)
(property) cacheStrategy: never
Type '{ ttl: number; swr: number; }' is not assignable to type 'never'.ts(2322)
(property) cacheStrategy: never
// prisma.ts
import { PrismaClient } from '@prisma/client'
import { withAccelerate } from '@prisma/extension-accelerate';

export const prisma = new PrismaClient().$extends(withAccelerate());
// prisma.ts
import { PrismaClient } from '@prisma/client'
import { withAccelerate } from '@prisma/extension-accelerate';

export const prisma = new PrismaClient().$extends(withAccelerate());
Solution:
okey is good all work i have conflict ( DATABASE_URL x2 in .env )
Jump to solution
4 Replies
Antonin
Antonin•3mo ago
Hello, I have this error with accelerate, do you know how to fix it?
Nurul
Nurul•3mo ago
Hello @nordiste 👋 Can you invoke npx prisma generate --no-engine command and check if you get the same error?
Antonin
Antonin•3mo ago
PrismaClientKnownRequestError:
Invalid `prisma.user.findFirst()` invocation:


Error validating datasource `db`: the URL must start with the protocol `prisma://`

clientVersion: '5.16.1',
meta: { modelName: 'User' }
}
PrismaClientKnownRequestError:
Invalid `prisma.user.findFirst()` invocation:


Error validating datasource `db`: the URL must start with the protocol `prisma://`

clientVersion: '5.16.1',
meta: { modelName: 'User' }
}
finally I was using the wrong instance of prisma, but now I get this error
Solution
Antonin
Antonin•3mo ago
okey is good all work i have conflict ( DATABASE_URL x2 in .env )
Want results from more Discord servers?
Add your server