tursodatabase / libsql-client-ts

TypeScript/JavaScript client API for libSQL
https://docs.turso.tech/sdk/ts/quickstart
MIT License
289 stars 37 forks source link

The client does not work with bun #85

Closed avinassh closed 1 year ago

avinassh commented 1 year ago

A user has reported that libsql fails with bun:

$ bunx drizzle-kit push:sqlite
[2.70ms] ".env"
No config path provided, using default path
Reading config file '/mnt/d/htmlcss/the-beth-stack/drizzle.config.ts'
drizzle-kit: v0.19.13
drizzle-orm: v0.28.6

43324 |       code;
43325 |       constructor(message, code, cause) {
43326 |         if (code !== void 0) {
43327 |           message = `${code}: ${message}`;
43328 |         }
43329 |         super(message, { cause });
            ^
LibsqlError: HRANA_WEBSOCKET_ERROR: Unexpected server response: 404
 code: "HRANA_WEBSOCKET_ERROR"

      at new LibsqlError (/mnt/d/htmlcss/the-beth-stack/node_modules/drizzle-kit/index.cjs:43329:8)
      at mapHranaError (/mnt/d/htmlcss/the-beth-stack/node_modules/drizzle-kit/index.cjs:48441:11)
      at /mnt/d/htmlcss/the-beth-stack/node_modules/drizzle-kit/index.cjs:48575:16
      at processTicksAndRejections (:1:2602)
error: "drizzle-kit" exited with code 1 (SIGHUP)
error: script "db:push" exited with code 1 (SIGHUP)

Another issue mentioned in the same thread about fetch

image

disucssion on discord

arjunindia commented 1 year ago

Thank you for opening this issue here as well ✨

avinassh commented 1 year ago

Closing as 0.3.3 fixed it