-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Description
I run on Deno and after update from @libsql/client @0.5.12 to @libsql/client @0.5.14. I got the below error:
import { type Client, createClient } from "@libsql/client";
const db = createClient({
url: Deno.env.get("TURSO_URL")!,
syncUrl: Deno.env.get("TURSO_SYNC_URL"),
authToken: Deno.env.get("TURSO_AUTH_TOKEN"),
syncInterval: Number(Deno.env.get("TURSO_SYNC_INTERVAL") || 3),
});
$deno run --allow-all --env-file=envs/.env test-create-client.ts
error: Uncaught (in promise) Error: sync error: invalid local state: generation is 0
at new Database (file:///Volumes/ADATA_SSD/coding/temp/deno/joplin-secretary/landing/node_modules/.deno/libsql@0.5.20/node_modules/libsql/index.js:89:17)
at _createClient (file:///Volumes/ADATA_SSD/coding/temp/deno/joplin-secretary/landing/node_modules/.deno/@libsql+client@0.15.14/node_modules/@libsql/client/lib-esm/sqlite3.js:49:16)
at _createClient (file:///Volumes/ADATA_SSD/coding/temp/deno/joplin-secretary/landing/node_modules/.deno/@libsql+client@0.15.14/node_modules/@libsql/client/lib-esm/node.js:21:16)
at createClient (file:///Volumes/ADATA_SSD/coding/temp/deno/joplin-secretary/landing/node_modules/.deno/@libsql+client@0.15.14/node_modules/@libsql/client/lib-esm/node.js:11:12)
at file:///Volumes/ADATA_SSD/coding/temp/deno/joplin-secretary/landing/test-create-client.ts:3:12
It's using libsql@0.5.20 that throw the error. I try to explicit libsql@0.5.17, by deno add npm:libsql@0.5.17
then edit deno.lock file:
"@libsql/client@0.15.14": {
"integrity": "sha512-oXeFYcSyAsYWvpWVmynrwNwb+NHNHtMfSIVdfQTF1B9RsgDXQE5YCDP3SS0i1FA8nuLWy2trFDVwP1b2LNdNPQ==",
"dependencies": [
"@libsql/core",
"@libsql/hrana-client",
"js-base64",
"libsql@0.5.17", <------- LIke this
"promise-limit"
]
},
It then works as normal
Metadata
Metadata
Assignees
Labels
No labels