You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a .env file with DATABASE_URL= that points to a CockroachDB database. You can get that info by signing up at https://www.cockroachlabs.com/ for a free account and creating a free database.
Instead of bunx prisma init --datasource-provider sqlite, do bunx prisma init --datasource-provider cockroachdb
Run the code.
Observe that it crashes out with no error message
What is the expected behavior?
The code works?
What do you see instead?
Nothing. It crashes the console app entirely. Exit code 0. No notification of a crash. "try/catch" ignores the problem. It just hard crashes.
Additional information
I tried adding this code to the sample:
try{awaitprisma.$connect();console.log("Connected to the database");}catch(e){console.error("Error connecting to the database:",e);}
It crashes immediately on the call to $connect. Neither message prints.
...to see if that was happening. Nope. It still crashes out.
I tested on a completely clean install, following the tutorial I linked above. I looked on Discord and found an old unsolved error from months ago that looks very similar.
Thoughts? I was really enthusiastic about Bun, but hitting a brick wall on the second day of development isn't inspiring confidence. And it's particularly vexing that Bun explicitly claims to work with Prisma.io, which it clearly doesn't for at least two of the database adapters.
What version of Bun is running?
1.0.25+a8ff7be64
What platform is your computer?
Linux 5.15.0-91-generic x86_64 x86_64
What steps can reproduce the bug?
Follow this guide:
https://bun.sh/guides/ecosystem/prisma
With the following exceptions:
bunx prisma init --datasource-provider sqlite
, dobunx prisma init --datasource-provider cockroachdb
What is the expected behavior?
The code works?
What do you see instead?
Nothing. It crashes the console app entirely. Exit code 0. No notification of a crash. "try/catch" ignores the problem. It just hard crashes.
Additional information
I tried adding this code to the sample:
It crashes immediately on the call to
$connect
. Neither message prints.I tried:
...to see if that was happening. Nope. It still crashes out.
I tested on a completely clean install, following the tutorial I linked above. I looked on Discord and found an old unsolved error from months ago that looks very similar.
Thoughts? I was really enthusiastic about Bun, but hitting a brick wall on the second day of development isn't inspiring confidence. And it's particularly vexing that Bun explicitly claims to work with Prisma.io, which it clearly doesn't for at least two of the database adapters.
This bug looks related:
#3647
...only now it crashes cleanly without the segfault.
The text was updated successfully, but these errors were encountered: