-
Notifications
You must be signed in to change notification settings - Fork 54
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/[email protected]/node_modules/libsql/index.js:89:17)
at _createClient (file:///Volumes/ADATA_SSD/coding/temp/deno/joplin-secretary/landing/node_modules/.deno/@[email protected]/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/@[email protected]/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/@[email protected]/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 [email protected] that throw the error. I try to explicit [email protected], by deno add npm:[email protected]
then edit deno.lock file:
"@libsql/[email protected]": {
"integrity": "sha512-oXeFYcSyAsYWvpWVmynrwNwb+NHNHtMfSIVdfQTF1B9RsgDXQE5YCDP3SS0i1FA8nuLWy2trFDVwP1b2LNdNPQ==",
"dependencies": [
"@libsql/core",
"@libsql/hrana-client",
"js-base64",
"[email protected]", <------- LIke this
"promise-limit"
]
},
It then works as normal
Metadata
Metadata
Assignees
Labels
No labels