TinoT
Denoβ€’3y agoβ€’
5 replies
Tino

Turso with local db file

I wanted to try out Turso's syncURL feature and for that it creates a local db file to read from and syncs any written data remote first before it writes it locally.

However, I am not getting that far due to the following issue:
LibsqlError: URL_SCHEME_NOT_SUPPORTED: The client that uses Web standard APIs supports only "libsql:", "wss:", "ws:", "https:" and "http:" URLs, got "file:". For more information, please read https://github.com/libsql/libsql-client-ts#supported-urls

Deno code:

// main.ts
createClient({
  url: "file:local.db",
  syncUrl: Deno.env.get("URL"),
  authToken: Deno.env.get("TOKEN")
});


The script has all permissions by deno run -A main.ts.

Based on the error file: is simply not supported since Deno is allowing only web standard APIs?
Any other way to allow this? I am just suprised this isn't working since the use case seems acceptable.
Was this page helpful?