corcube
corcube
TTCTheo's Typesafe Cult
Created by corcube on 7/24/2023 in #questions
Prisma MySQL findMany problem with chirp tutorial
Whelp, it's solved and I have no idea how. Things started working when I commented out the mysql url and provider in the prisma schema while adding the sqlite provider and url.... and then it kept working when I commented out the sqlite provider and url and uncommented the mysql provider and url. Literally no other code was changed. throws hands up in the air I'm guessing the swap between the db types rejigged something in prisma? I'll leave this all here in case someone else comes across this problem and they can try this as a 'solution'.
5 replies
TTCTheo's Typesafe Cult
Created by corcube on 7/24/2023 in #questions
Prisma MySQL findMany problem with chirp tutorial
Full error message:
prisma:error
Invalid `prisma.post.findMany()` invocation:


Operation 'findMany' for model 'Post' does not match any query.
PrismaClientUnknownRequestError:
Invalid `prisma.post.findMany()` invocation:


Operation 'findMany' for model 'Post' does not match any query.
at zr.handleRequestError (E:\Onedrive\Documents\server\Node\bicker2\bicker2\node_modules\@prisma\client\runtime\library.js:122:8480)
at zr.handleAndLogRequestError (E:\Onedrive\Documents\server\Node\bicker2\bicker2\node_modules\@prisma\client\runtime\library.js:122:7697)
at zr.request (E:\Onedrive\Documents\server\Node\bicker2\bicker2\node_modules\@prisma\client\runtime\library.js:122:7307)
at async eval (webpack-internal:///(api)/./src/server/api/routers/posts.ts:14:20)
at async resolveMiddleware (file:///E:/Onedrive/Documents/server/Node/bicker2/bicker2/node_modules/@trpc/server/dist/index.mjs:416:30)
at async callRecursive (file:///E:/Onedrive/Documents/server/Node/bicker2/bicker2/node_modules/@trpc/server/dist/index.mjs:452:32)
at async resolve (file:///E:/Onedrive/Documents/server/Node/bicker2/bicker2/node_modules/@trpc/server/dist/index.mjs:482:24)
at async inputToProcedureCall (file:///E:/Onedrive/Documents/server/Node/bicker2/bicker2/node_modules/@trpc/server/dist/resolveHTTPResponse-8d917a7c.mjs:46:22)
at async Promise.all (index 0)
at async resolveHTTPResponse (file:///E:/Onedrive/Documents/server/Node/bicker2/bicker2/node_modules/@trpc/server/dist/resolveHTTPResponse-8d917a7c.mjs:173:37)
at async file:///E:/Onedrive/Documents/server/Node/bicker2/bicker2/node_modules/@trpc/server/dist/nodeHTTPRequestHandler-2b341e93.mjs:67:9
at async file:///E:/Onedrive/Documents/server/Node/bicker2/bicker2/node_modules/@trpc/server/dist/adapters/next.mjs:44:9 {
clientVersion: '5.0.0'
}
prisma:error
Invalid `prisma.post.findMany()` invocation:


Operation 'findMany' for model 'Post' does not match any query.
PrismaClientUnknownRequestError:
Invalid `prisma.post.findMany()` invocation:


Operation 'findMany' for model 'Post' does not match any query.
at zr.handleRequestError (E:\Onedrive\Documents\server\Node\bicker2\bicker2\node_modules\@prisma\client\runtime\library.js:122:8480)
at zr.handleAndLogRequestError (E:\Onedrive\Documents\server\Node\bicker2\bicker2\node_modules\@prisma\client\runtime\library.js:122:7697)
at zr.request (E:\Onedrive\Documents\server\Node\bicker2\bicker2\node_modules\@prisma\client\runtime\library.js:122:7307)
at async eval (webpack-internal:///(api)/./src/server/api/routers/posts.ts:14:20)
at async resolveMiddleware (file:///E:/Onedrive/Documents/server/Node/bicker2/bicker2/node_modules/@trpc/server/dist/index.mjs:416:30)
at async callRecursive (file:///E:/Onedrive/Documents/server/Node/bicker2/bicker2/node_modules/@trpc/server/dist/index.mjs:452:32)
at async resolve (file:///E:/Onedrive/Documents/server/Node/bicker2/bicker2/node_modules/@trpc/server/dist/index.mjs:482:24)
at async inputToProcedureCall (file:///E:/Onedrive/Documents/server/Node/bicker2/bicker2/node_modules/@trpc/server/dist/resolveHTTPResponse-8d917a7c.mjs:46:22)
at async Promise.all (index 0)
at async resolveHTTPResponse (file:///E:/Onedrive/Documents/server/Node/bicker2/bicker2/node_modules/@trpc/server/dist/resolveHTTPResponse-8d917a7c.mjs:173:37)
at async file:///E:/Onedrive/Documents/server/Node/bicker2/bicker2/node_modules/@trpc/server/dist/nodeHTTPRequestHandler-2b341e93.mjs:67:9
at async file:///E:/Onedrive/Documents/server/Node/bicker2/bicker2/node_modules/@trpc/server/dist/adapters/next.mjs:44:9 {
clientVersion: '5.0.0'
}
5 replies