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
session store error #111
Comments
@kleydon any idea how to fix this |
Hi @aresthegofwar, thanks for this. I haven't encountered the error before, but if you post some context (ideally a PR on a fork of this repository, but possibly just a code snippet, showing how the error can be reproduced) it'll make it easier for anyone using this package to help with ideas for a solution. By any chance are you using Nest or Passport? In the past, I believe other users have reported type mis-matches with these libraries; I'm not 100% sure if these have been solved yet or not. |
Am using nestjs |
And also passport too |
@rajamoulimallareddy Just to clarify: You are using (I've not used |
Using nest and passport with prisma-session-store and am getting seeing this issue. And also even if it runs successfully the cookies are not generated for some reason |
@rajamoulimallareddy Good to know; thanks for posting this context. My time's pretty limited to work on this at the moment, but hopefully others who are using this library can jump in? |
i'm using nestjs and prisma as well and seeing this issue, no passport. Nest is v9.3.9 and prisma v4.10 prisma-session-store is v3.1.10 |
@ChristopherLMiller - thanks for the additional data point. |
@aresthegofwar looks like you haven't generated the client types or missing the session model. Try defining the Session model in your
And then run |
Am not using mongoose and also I did generate the schema. It works fine when i login through login page. |
I am also encountering this issue. Any fixes yet? |
just run npx prisma generate after when you have added model Session |
Argument of type 'PrismaClient<PrismaClientOptions, never, RejectOnNotFound | RejectPerOperation>' is not assignable to parameter of type 'IPrisma<"session">'. Property 'session' is missing in type 'PrismaClient<PrismaClientOptions, never, RejectOnNotFound | RejectPerOperation>' but required in type 'Record<"session", { create(args: ICreateArgs): Promise<IPrismaSession>; delete(args: IDeleteArgs): Promise<IPrismaSession>; deleteMany(args?: unknown): Promise<...>; findMany(args?: IFindManyArgs): Promise<...>; findUnique(args: IFindUniqueArgs): Promise<...>; update(args: IUpdateArgs): Promise<...>; }>'.ts(2345)
The text was updated successfully, but these errors were encountered: