nikitarevenco
PPrisma
•Created by nikitarevenco on 7/12/2024 in #help-and-questions
Prisma Client is not configured to run in the edge runtime
if I do, ill let you know
18 replies
PPrisma
•Created by nikitarevenco on 7/12/2024 in #help-and-questions
Prisma Client is not configured to run in the edge runtime
yes!,
I am also using bcryptjs
18 replies
PPrisma
•Created by nikitarevenco on 7/12/2024 in #help-and-questions
Prisma Client is not configured to run in the edge runtime
Looks like for now your solution is likely the best workaround at the moment. Would be nice to actually be able to use
middleware.ts
once this gets fixed though18 replies
PPrisma
•Created by nikitarevenco on 7/12/2024 in #help-and-questions
Prisma Client is not configured to run in the edge runtime
I also found an issue which is directly related to this:
https://github.com/brianc/node-postgres/issues/3206
18 replies
PPrisma
•Created by nikitarevenco on 7/12/2024 in #help-and-questions
Prisma Client is not configured to run in the edge runtime
18 replies
PPrisma
•Created by nikitarevenco on 7/12/2024 in #help-and-questions
Prisma Client is not configured to run in the edge runtime
Since I am using the prisma resolver
18 replies
PPrisma
•Created by nikitarevenco on 7/12/2024 in #help-and-questions
Prisma Client is not configured to run in the edge runtime
I have a question, if I can't access the prisma client, and by extension
auth
, how am I supposed to know if the user is authenticated or not? This is how I used to do it:
But since I can't use the auth
function I have no idea how to get the user's session without using prisma client18 replies
PPrisma
•Created by nikitarevenco on 7/12/2024 in #help-and-questions
Prisma Client is not configured to run in the edge runtime
thanks mate
18 replies
PPrisma
•Created by nikitarevenco on 7/12/2024 in #help-and-questions
Prisma Client is not configured to run in the edge runtime
I need better time management skills
18 replies
PPrisma
•Created by nikitarevenco on 7/12/2024 in #help-and-questions
Prisma Client is not configured to run in the edge runtime
bruh I spend 5 hours on this LOL
18 replies
PPrisma
•Created by nikitarevenco on 7/12/2024 in #help-and-questions
Prisma Client is not configured to run in the edge runtime
omg you're right
18 replies
PPrisma
•Created by nikitarevenco on 7/12/2024 in #help-and-questions
Get type of prisma client before it is defined
What actually happens is TS thinks that
db
has db.model
which shouldn't happen12 replies
PPrisma
•Created by nikitarevenco on 7/12/2024 in #help-and-questions
Get type of prisma client before it is defined
12 replies
PPrisma
•Created by nikitarevenco on 7/12/2024 in #help-and-questions
Get type of prisma client before it is defined
Ideally we can somehow set
var prisma: PrismaClientWithExtension<typeof extension>
or something like that. Not sure if it's a thing though12 replies
PPrisma
•Created by nikitarevenco on 7/12/2024 in #help-and-questions
Get type of prisma client before it is defined
Your code has the same problem as mine though, since you are setting
prisma: PrismaClient
if you want your prisma client to have an extension it will be of the wrong type.
eg:
You see, we have added an extension
to PrismaClient
but the type of prisma
is still PrismaClient
, so like if our extension has a method then typescript won't know about it12 replies
PPrisma
•Created by nikitarevenco on 7/12/2024 in #help-and-questions
Get type of prisma client before it is defined
This isn't on the middleware, it's in
prisma/index.ts
.
This error doesn't happen if I remove the createPrismaClient
function. e.g.:
No Error:
Yes Error:
12 replies
PPrisma
•Created by nikitarevenco on 7/12/2024 in #help-and-questions
Get type of prisma client before it is defined
12 replies