libsql-client-ts
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:".
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:".