waddler icon indicating copy to clipboard operation
waddler copied to clipboard

Waddler requires @clickhouse/client to work even in standalone

Open yacobmole opened this issue 3 months ago • 4 comments

Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@clickhouse/client' imported from /home/jacob/.../node_modules/.pnpm/[email protected]/node_modules/waddler/clickhouse/driver.js

Waddler requires @clickhouse/client to work even when using standalone SQL

import { sql } from "waddler/clickhouse";

If i want to use @clickhouse/client-web i have to install both dependencies.

I want to be able to use import { sql } from "waddler/clickhouse" without installing extra dependencies. That way, I can create a shared package that leverages Waddler for SQL statement construction, while leaving the choice open to use either clickhouse-js drivers, another driver, or no driver at all—just Waddler for building queries.

yacobmole avatar Sep 08 '25 08:09 yacobmole

Any ETA on when this will be ready

Current work around im using is https://github.com/yacobmole/glayse/blob/81ec62b000b5267f6260efc93072717e4610e47e/src/orm/lib/sql.ts

yacobmole avatar Sep 13 '25 05:09 yacobmole

https://github.com/drizzle-team/waddler/issues/7

Might be related

yacobmole avatar Sep 15 '25 08:09 yacobmole

This should be fixed in this PR: https://github.com/drizzle-team/waddler/pull/5. However, the API will be slightly changed:

  • to import standalone sql for ClickHouse dialect, use:
import { sql } from 'waddler/clickhouse-core';

Until this pull request is merged and Waddler reaches version 0.2.0, you can install the PR version directly:

npm install [email protected]

OleksiiKH0240 avatar Sep 15 '25 14:09 OleksiiKH0240

Thanks will give it a test, thanks for the insight

yacobmole avatar Sep 16 '25 03:09 yacobmole