Skip to content
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

TypeError: prisma.subscriber.cursorStream is not a function #3

Closed
bdueck-oftr opened this issue Feb 24, 2024 · 2 comments
Closed

TypeError: prisma.subscriber.cursorStream is not a function #3

bdueck-oftr opened this issue Feb 24, 2024 · 2 comments
Labels
invalid This doesn't seem right

Comments

@bdueck-oftr
Copy link

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";

@aularon
Copy link
Contributor

aularon commented Mar 2, 2024

Hello Brian!

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.

Thank you 🙏

@aularon aularon added question Further information is requested and removed question Further information is requested labels Mar 2, 2024
@aularon aularon closed this as completed Jan 20, 2025
@aularon aularon reopened this Jan 20, 2025
@aularon aularon added the invalid This doesn't seem right label Jan 20, 2025
@aularon
Copy link
Contributor

aularon commented Jan 20, 2025

Closing due to lack of information (cannot reproduce issue)

@aularon aularon closed this as not planned Won't fix, can't repro, duplicate, stale Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants