ClickHouse / clickhouse-js

Official JS client for ClickHouse DB
https://clickhouse.com
Apache License 2.0
189 stars 22 forks source link

Bun: ClickHouse DB not connecting #260

Closed nmdaniil closed 3 months ago

nmdaniil commented 3 months ago

Using Bun instead of nodejs it doesn't work

What version of Bun is running?*

1.0.1

What platform is your computer?

What steps can reproduce the bug?

import { createClient } from "@clickhouse/client";

console.log('connecting ClickHouse DB ...')
const CHDB = createClient({
    host: config.database.chdb.host,
    username: config.database.chdb.user,
    password: config.database.chdb.password,
    database: config.database.chdb.database
});
console.log(await CHDB.ping());

What is the expected behavior?

connecting ClickHouse DB ...
{ success: true }

What do you see instead?

connecting ClickHouse DB ...

Additional information It just hangs and laptop fan starts to make high noise.

Before bun 1.0, it used to crash with only "Segmentation Fault" in console.

slvrtrn commented 3 months ago

Does it work if you use @clickhouse/client-web instead of @clickhouse/client?

slvrtrn commented 3 months ago

Related: https://github.com/ClickHouse/clickhouse-js/issues/211

nmdaniil commented 1 month ago

🎉 Dear gentlemen, I wanted to please you that in the new version (~1.1.13+) of the Bun the library is working ✅