libsql-client-ts icon indicating copy to clipboard operation
libsql-client-ts copied to clipboard

LibsqlError: URL_SCHEME_NOT_SUPPORTED: The client that uses Web standard APIs supports only "libsql:", "wss:", "ws:", "https:" and "http:" URLs, got "file:".

Open johnqiuwan opened this issue 9 months ago • 1 comments

It seems that the libsql not working in nextjs15 and middleware(edge runtime).

the sample code not working in nextjs15 and edge runtime:

const tursoClient = createClient({
  url: `file:local.db`,
  syncInterval: 60,
  syncUrl: process.env.TURSO_DATABASE_URL,
  authToken: process.env.TURSO_AUTH_TOKEN,
});

It gives the error LibsqlError: URL_SCHEME_NOT_SUPPORTED: The client that uses Web standard APIs supports only "libsql:", "wss:", "ws:", "https:" and "http:" URLs, got "file:".

johnqiuwan avatar Jan 13 '25 00:01 johnqiuwan