You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've hit a problem which seems similar to issue #1 using this very handy library with SvelteKit as part of an API route implementation.
The error TypeError: prisma.subscriber.cursorStream is not a function is thrown when cursorStream is called.
I believe the problem relates to some stricter requirements related to imports.
Specifically, the import statements in index.ts should be modified as follows to use "import type" for PrismaClientExtends and DefaultArgs.
import type {PrismaClientExtends} from "@prisma/client/extension"; import {Prisma} from "@prisma/client/extension"; import type {DefaultArgs} from "@prisma/client/runtime/library";
The text was updated successfully, but these errors were encountered:
I don't believe the issue is related to strictly importing types (The initial code was made before that feature hit typescript stable AFAIR). Did you try the suggested fix? I believe the issue relates to how the extension is added to Prisma client (new PrismaClient().$extends(cursorStream);), or maybe it is added to a client instance but consumed in a non-extended instance.
Can you help me investigate the above lines of thought (your suggestion, or my suggestions). Or provide me with a minimal reproduction so I can further investigate.
I've hit a problem which seems similar to issue #1 using this very handy library with SvelteKit as part of an API route implementation.
The error
TypeError: prisma.subscriber.cursorStream is not a function
is thrown whencursorStream
is called.I believe the problem relates to some stricter requirements related to imports.
Specifically, the import statements in index.ts should be modified as follows to use "import type" for PrismaClientExtends and DefaultArgs.
import type {PrismaClientExtends} from "@prisma/client/extension";
import {Prisma} from "@prisma/client/extension";
import type {DefaultArgs} from "@prisma/client/runtime/library";
The text was updated successfully, but these errors were encountered: