D1 incorrect dialect
I'm trying to create an auth instance with D1 and getting an error like
Type 'D1Dialect' is not assignable to type 'Dialect'.
The types returned by 'createDriver().acquireConnection()' are incompatible between these types.
Type 'Promise<import("<my-project>/node_modules/kysely/dist/esm/driver/database-connection").DatabaseConnection>' is not assignable to type 'Promise<import("<my-project>/node_modules/better-auth/node_modules/kysely/dist/esm/driver/database-connection").DatabaseConnection>'.
My code is like:
Any suggestions?Solution:Jump to solution
Following up if anyone encounters this in the future. Could resolve this by using older versions of
kysely-d1
and kysely
.
Relevant package dependencies look like:
```
"better-auth": "^1.2.7",...2 Replies