bun
bun copied to clipboard
Latest Prisma not working with Bun - tokio crashes
What version of Bun is running?
1.1.3
What platform is your computer?
Windows
What steps can reproduce the bug?
https://github.com/prisma/prisma/issues/23836
What is the expected behavior?
SQLite - Prisma is working fine.
What do you see instead?
thread 'tokio-runtime-worker' panicked at query-engine\query-engine-node-api\src\engine.rs:244:49:
called Result::unwrap() on an Err value: JoinError::Cancelled(Id(22))
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
Additional information
Kindly check the issue link I provide.
Just curious. Do you have node installed on your system? I recently noticed an issue where prisma does not work if node is not installed.
Just curious. Do you have node installed on your system? I recently noticed an issue where prisma does not work if node is not installed.
Yes, I have node installed on my machine
Observing the same bug on both Windows and Linux with [email protected]. I have Node.js installed on both machines.
I managed to create the following minimal example:
- Follow https://bun.sh/guides/ecosystem/prisma
- Run the following code
import { Prisma, PrismaClient } from '@prisma/client';
const prismaClient = new PrismaClient();
(async () => {
const result = await prismaClient.$queryRaw(Prisma.sql`SELECT 1+1`);
console.log("success");
console.log(result);
})();
This either throws the abovementioned tokio error or it does nothing (nothing is printed).
What is interesting that the following code works perfectly:
import { Prisma, PrismaClient } from '@prisma/client';
const prismaClient = new PrismaClient();
//(async () => {
const result = await prismaClient.$queryRaw(Prisma.sql`SELECT 1+1`);
console.log("success");
console.log(result);
//})();