Closed zzzej closed 1 year ago
Thanks for pointing out the issue
This is an ESM <> CJS module load order bug in Bun (not a bug in Kysely)
Pushed a fix for this in the canary build of Bun
This canary build has quite a lot of changes (new bundler) so there could be other things that crop up, but if you want to try it:
bun upgrade --canary
Before:
After:
Worked on bun version 0.6
! π
To be clear version 0.6
has not been released as of today. To use this version you need to run
bun upgrade --canary
as @Jarred-Sumner mentioned above
Setting up a new project with Kysely and the PlanetScaleDialect. I get the following error after a simple query or even with I
console.log(db)
The error:
This is my
db.ts
file:this is where I want to execute the query:
It works perfectly fine with just the planetscale driver (no kysely)
My system info: Laptop: M2 Pro Server: bun 0.5.8 Global node version: 16.19 Global npm: 9.6