TypeError: Cannot read properties of undefined (reading 'exec')
"Hi, does anyone know why I'm getting a TypeError: Cannot read properties of undefined (reading 'exec') when using Prisma with @prisma/adapter-neon and Next.js? The error seems to originate in library.js and could be related to the environment or connection configuration. I'm attaching a screenshot with the stack trace and debug info. Thanks in advance!"
13 Replies
Hi @simo
Can you please show how you are instantiating and using Prisma Client in your code?
In your
client.ts
file, I think this is the declaration you need
You can now import it like this
Thank you very much for your help. I have made the suggested changes and I still have the same error. I suspect that it may be something wrong with the version of openSSL I have installed on my Windows OS.
Or maybe I have openSSL configured wrong
What version of openssl do you recommend?
Can you please confirm if this will be deployed to the edge?
No, it is not deployed to edge
Sorry, I don't have access to the code right now, but when I can, I'll attach all the possible parts of the code.
In that case, you can simply make do the code below in your
client.ts
filewith
I still have the same error
Is it possible to share the repo so i can take a look
I have cleared the npm cache and reinstalled node.js
After clearing the npm cache and reinstalling node, does the error persist? if yes, is it possible to share a reproducible repo with me
Yes, the error persists. I'll share a repo with you this afternoon. Thanks
Looking forward to it. Thanks