Netlify won't deploy my Next.js+Prisma app

I’m having trouble deploying this basic Next.js app with Prisma to Netlify: GitHub - jhackett1/example-deploy-to-netlify-app

It fails with a message I don’t understand:

9:26:06 PM: TypeError: debugLib is not a function
9:26:06 PM:     at Object.<anonymous> (/opt/build/repo/.next/serverless/pages/index.js:2378:15)
9:26:06 PM:     at Object.6Z5O (/opt/build/repo/.next/serverless/pages/index.js:2515:30)
9:26:06 PM:     at __webpack_require__ (/opt/build/repo/.next/serverless/pages/index.js:23:31)
9:26:06 PM:     at Object.<anonymous> (/opt/build/repo/.next/serverless/pages/index.js:40402:65)
9:26:06 PM:     at Object.Kg+b (/opt/build/repo/.next/serverless/pages/index.js:40414:30)
9:26:06 PM:     at __webpack_require__ (/opt/build/repo/.next/serverless/pages/index.js:23:31)
9:26:06 PM:     at Module.RNiq (/opt/build/repo/.next/serverless/pages/index.js:41172:72)
9:26:06 PM:     at __webpack_require__ (/opt/build/repo/.next/serverless/pages/index.js:23:31)
9:26:06 PM:     at Module.uxUJ (/opt/build/repo/.next/serverless/pages/index.js:52569:23)
9:26:06 PM:     at __webpack_require__ (/opt/build/repo/.next/serverless/pages/index.js:23:31) {
9:26:06 PM:   type: 'TypeError'
9:26:06 PM: }

The app builds fine locally, and on both Vercel: and Heroku:

The Netlify site would be at

Prisma is getting increasingly popular and many new high-level frameworks (Blitz and Redwood) rely on it. It would be great to get it working out of the box with Netlify.

I found this issue on Prisma which might be related: Query engine binary could not be found on netlify deployment with Next · Issue #6051 · prisma/prisma · GitHub

I also opened this issue with Next.js, in case the problem si there: Next.js app with Prisma won't build on Netlify · Issue #23279 · vercel/next.js · GitHub

Hello there, @jaye.hackett :wave:

Apologies for the slow response here. I see that no one has chimed in over the past week or so. Are you still encountering this issue? If so, please let me know and I will share it with one of my teammates!


yes, still broken.

it may be to do with that prisma issue i linked to, but it’s odd that this only affects netlify. deploys to vercel and heroku both work fine.

Hey there, @jaye.hackett :wave:

It looks like the bug you filed on Prisma’s board got fixed today. Please update Primsa to the latest version, 2.20.0, so that you can see this fix.