P
Prisma3d ago
Franco

Prisma 6.2 seems incompatible with Turso

I am getting both type and runtime errors when creating a prisma client with the libsql adapter. Is this expected behaviour? My project was working fine with Prisma ^5.16.2 and I decided to upgrade for the enums, but I'm not being able to query data. Migrations do work properly though
⨯ TypeError: Cannot read properties of undefined (reading 'bind')
at Qi (/home/franco/Repos/el-menu/node_modules/@prisma/client/runtime/library.js:29:13296)
at new t (/home/franco/Repos/el-menu/node_modules/@prisma/client/runtime/library.js:130:1230)
at getPrismaSingleton (webpack-internal:///(rsc)/./src/utils/prisma.ts:21:12)
at eval (webpack-internal:///(rsc)/./src/utils/prisma.ts:26:42)
at (rsc)/./src/utils/prisma.ts (/home/franco/Repos/el-menu/.next/server/app/[locale]/404/page.js:1290:1)
at __webpack_require__ (/home/franco/Repos/el-menu/.next/server/webpack-runtime.js:33:43)
at eval (webpack-internal:///(rsc)/./src/auth.ts:20:71)
at (rsc)/./src/auth.ts (/home/franco/Repos/el-menu/.next/server/app/[locale]/404/page.js:1063:1)
at __webpack_require__ (/home/franco/Repos/el-menu/.next/server/webpack-runtime.js:33:43)
at eval (webpack-internal:///(rsc)/./src/utils/auth/getActiveUser.ts:6:63) {
type: 'TypeError',
page: '/es/404'
}
⨯ TypeError: Cannot read properties of undefined (reading 'bind')
at Qi (/home/franco/Repos/el-menu/node_modules/@prisma/client/runtime/library.js:29:13296)
at new t (/home/franco/Repos/el-menu/node_modules/@prisma/client/runtime/library.js:130:1230)
at getPrismaSingleton (webpack-internal:///(rsc)/./src/utils/prisma.ts:21:12)
at eval (webpack-internal:///(rsc)/./src/utils/prisma.ts:26:42)
at (rsc)/./src/utils/prisma.ts (/home/franco/Repos/el-menu/.next/server/app/[locale]/404/page.js:1290:1)
at __webpack_require__ (/home/franco/Repos/el-menu/.next/server/webpack-runtime.js:33:43)
at eval (webpack-internal:///(rsc)/./src/auth.ts:20:71)
at (rsc)/./src/auth.ts (/home/franco/Repos/el-menu/.next/server/app/[locale]/404/page.js:1063:1)
at __webpack_require__ (/home/franco/Repos/el-menu/.next/server/webpack-runtime.js:33:43)
at eval (webpack-internal:///(rsc)/./src/utils/auth/getActiveUser.ts:6:63) {
type: 'TypeError',
page: '/es/404'
}
No description
1 Reply
Prisma AI Help
You chose to compile with the bot. One moment while I piece together your answer… Based on the information provided in the knowledge sources, it appears that there might be compatibility issues between Prisma 6.2 and Turso. However, I don't have specific information about Prisma 6.2 in the given knowledge sources. The most recent version mentioned is 5.15.0. That being said, there are a few points to consider: 1. Prisma support for Turso is currently in Early Access, as mentioned in the Prisma documentation on Turso. This means that there might be some instability or incompatibilities, especially with newer versions. 2. The error you're encountering seems to be related to the Prisma Client runtime, which could indicate a problem with the client initialization or the adapter configuration. 3. In the Prisma blog post about Turso support, it's mentioned that you need to enable the driverAdapters preview feature and install the libSQL database client and driver adapter for Prisma Client. To troubleshoot this issue, you could try the following: 1. Make sure you have the driverAdapters preview feature enabled in your schema:
generator client {
provider = "prisma-client-js"
previewFeatures = ["driverAdapters"]
}
generator client {
provider = "prisma-client-js"
previewFeatures = ["driverAdapters"]
}
2. Ensure you have installed the correct versions of the libSQL client and Prisma adapter:
npm install @libsql/client @prisma/adapter-libsql
npm install @libsql/client @prisma/adapter-libsql
3. Double-check your Prisma Client initialization code to make sure it's correctly set up with the Turso adapter. If the issue persists, you might want to consider reverting to the last working version (5.16.2) until the compatibility issues are resolved. Additionally, you could report this issue on the Prisma GitHub repository to get more specific help from the Prisma team. Remember that support for Turso is still in Early Access, so some instability is to be expected, especially with newer Prisma versions. ✅ Great, thanks for letting us know that this solved your question!

Did you find this page helpful?