prisma
prisma copied to clipboard
`Cannot fetch data from service:\n include is not a function` Error while using Next.js with AWS Lambda with Data Proxy
Bug description
As reported by the end user:
We are using Prisma 4.2.1 and our database is publicly accessible. Prisma itself was working perfectly fine with the direct database url. It only started failing recently in production when trying to integrate Data Proxy. I have attached screenshots of our configuration. We are using Nextjs with Prisma and the attached files show a simple backend request fetching data using Data Proxy, which should be hitting our database. We created a simple lib file to have a single instance of Prisma that we can import into our backend calls. When running the app in a dev environment and running the build files locally, there are no issues with connecting to Data Proxy and fetching and inserting data into our database. Debugging on our end, we have identified that the error is P5010, but are having trouble finding info on how to resolve this issue. Since we are using Serverless js, we have tried using the prisma/client/edge, as opposed to prisma/client because our application gets deployed to Cloudfront with Lambda@Edge, but we have noticed no difference. We have a .env file that imports the variables and have confirmed that the backend call is using the correct Data Proxy url.
Message Link for Internal Slack: https://prisma-company.slack.com/archives/C02GF9J74SH/p1654854367720369
How to reproduce
Reproduction code:
Instructions to run the code are in the README.md file in zip folder.
AWS Configuration Images:
Error Logs Images:
Expected behavior
Should not get include is not a function error.
Prisma information
The Schema file is in the attached zip folder.
Environment & setup
- Next.js with AWS Lambda
Prisma Version
Prisma Version 4.2.1






