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: https://example-deploy-to-netlify-app.vercel.app/ and Heroku: https://nextjs-example-broken.herokuapp.com/
The Netlify site would be at https://loving-neumann-38f5b6.netlify.app/
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